Service accounts for webhooks

2 minute readReference
  • Service Account Management: A service account is a special account object for use with webhooks management.

createServiceAccount

Creates a new ServiceAccount object. Use a service account when creating and managing webhooks sessions.

You must specify a serviceAccountName.

ArgumentsDescriptions

serviceAccountName

The service account name.

Argument type: String

description

(Optional) Comment text describing this object that is not interpreted at all by CloudBees CD/RO .

Argument type: String

Positional arguments

serviceAccountName

Response

Returns a serviceAccount object.

ec-perl

syntax: $cmdr->createServiceAccount(<serviceAccountName>, {description});

Example

$cmdr->createServiceAccount('test', {description => "This is a description."});

ectool

syntax: ectool createServiceAccount <serviceAccountName> [--description]

Example

ectool createServiceAccount "test" --description "This is a description."

deleteServiceAccount

Deletes a service account.

You must specify the serviceAccountName object to delete.

ArgumentsDescriptions

serviceAccountName

The service account name to delete.

Argument type: String

Positional arguments

serviceAccountName

Response

None or a status OK message.

ec-perl

syntax: $cmdr->deleteServiceAccount(<service accountName>);

Example

$cmdr->deleteServiceAccount("Test");

ectool

syntax: ectool deleteServiceAccount <serviceAccountName>

Example

ectool deleteServiceAccount "Test"

getServiceAccount

Retrieves a service account by its name.

You must specify the serviceAccountName object to retrieve.

ArgumentsDescriptions

serviceAccountName

The name of the service account to retrieve.

Argument type: String

Positional arguments

service accountName

Response

Returns a serviceAccount object.

ec-perl

syntax: $cmdr->getServiceAccount(<serviceAccountName>);

Example

$cmdr->getServiceAccount("Test");

ectool

syntax: ectool getServiceAccount <serviceAccountName>

Example

ectool getServiceAccount "Test"

getServiceAccounts

Retrieves all service accounts.

ArgumentsDescriptions

None

Positional arguments

None

Response

Returns zero or more serviceAccount objects.

ec-perl

syntax: $cmdr->getServiceAccounts();

Example

$cmdr->getServiceAccounts();

ectool

syntax: ectool getServiceAccounts

Example

ectool getServiceAccounts

modifyServiceAccount

You must specify a serviceAccountName.

ArgumentsDescriptions

serviceAccountName

The service account name to modify.

Argument type: String

description

(Optional) Comment text describing this object that is not interpreted at all by CloudBees CD/RO .

Argument type: String

newName

(Optional) New name for an existing service account that is being renamed.

Argument type: String

Positional arguments

serviceAccountName

Response

Returns a serviceAccount object.

ec-perl

syntax: $cmdr->modifyServiceAccount(<serviceAccountName>, {<optionals>});

Example

$cmdr->modifyServiceAccount("Test", {newName => "NewTest"});

ectool

syntax: ectool modifyServiceAccount <serviceAccountName> [optionals]

Example

ectool modifyServiceAccount "Test" --newName "NewTest"