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

--name

Name of the new service

--teamId

TeamID of the team to associate the service with

Optional Parameters

Parameter

--description

Team Description

--visibility

Service 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

--id

The ID of the service to be updated

Optional Parameters

Parameter

--name

The new name of the service

--description

New service description

--visibility

Changed 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

--id

The 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

--id

The 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

--limit

Number of results per page

--offset

Pagination offset

Sample Usage:
Without Params

opsgenie-lamp listServices

**With Optional Params

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

Did this page help you?