Lamp: Service Commands

Create Service command

Lamp createService command is used to create service in OpsGenie. createService command takes the following parameters:

Mandatory Parameters

Parameter
--nameName of the new service
--teamIdTeamID of the team to associate the service with

Optional Parameters

Parameter
--descriptionTeam Description
--visibilityService Visibility. Allowed values -(TEAM_MEMBERS, OPSGENIE_USERS)

Sample Usage:

With mandatory parameters:

opsgenie-lamp createService --name="test service" --teamId="c09f063a-e6bf-4d5c-a796-e49f7ee520e4"

With optional parameters:

opsgenie-lamp createService --name="test service" --teamId="c09f063a-e6bf-4d5c-a796-e49f7ee520e4" --visibility=TEAM_MEMBERS --description="This is test service"

Update Service command

Lamp updateService command is used to update existing service in OpsGenie. updateService command takes the following parameters:

Mandatory Parameters

Parameter
--idThe ID of the service to be updated

Optional Parameters

Parameter
--nameThe new name of the service
--descriptionNew service description
--visibilityChanged service visibility. Allowed values- (TEAM_MEMBERS, OPSGENIE_USERS)

Sample Usage:

With parameters:

opsgenie-lamp updateService --id="c09f063a-e6bf-4d5c-a796-e49f7ee520e4" --name="New service name"
opsgenie-lamp updateService --id="c09f063a-e6bf-4d5c-a796-e49f7ee520e4" --name="New service name" --description="New service description"
opsgenie-lamp updateService --id="c09f063a-e6bf-4d5c-a796-e49f7ee520e4" --name="New service name" --description="New service description" --visibility=TEAM_MEMBERS
opsgenie-lamp updateService --id="c09f063a-e6bf-4d5c-a796-e49f7ee520e4" --visibility=TEAM_MEMBERS

Delete Service command

Lamp deleteService command is used to delete the specified service in OpsGenie. deleteService command takes the following parameters:

Mandatory Parameters

Parameter
--idThe ID of the service to be deleted

Sample Usage:

opsgenie-lamp deleteService --id="c09f063a-e6bf-4d5c-a796-e49f7ee520e4"

Get Service Command

Lamp getService command is used to get the details of the specified service in OpsGenie. getService command takes the following parameters:

Mandatory Parameters

Parameter
--idThe ID of the service to be fetched

Sample Usage:

opsgenie-lamp getService --id="c09f063a-e6bf-4d5c-a796-e49f7ee520e4"

List Services Command

Lamp listServices command is used to get the details of the services in OpsGenie. listServices command takes the following parameters:

Optional Parameters

Parameter
--limitNumber of results per page
--offsetPagination offset

Sample Usage:
Without Params

opsgenie-lamp listServices

**With Optional Params

opsgenie-lamp listServices --limit=2 --offset=0