Class v1.ServiceManagerClient (0.3.1)

[Google Service Management API](https://cloud.google.com/service-management/overview) v1

Package

@google-cloud/service-management

Constructors

(constructor)(opts)

constructor(opts?: ClientOptions);

Construct an instance of ServiceManagerClient.

Parameter
NameDescription
opts ClientOptions

Properties

apiEndpoint

static get apiEndpoint(): string;

The DNS address for this API service - same as servicePath(), exists for compatibility reasons.

auth

auth: gax.GoogleAuth;

descriptors

descriptors: Descriptors;

innerApiCalls

innerApiCalls: {
        [name: string]: Function;
    };

operationsClient

operationsClient: gax.OperationsClient;

port

static get port(): number;

The port for this API service.

scopes

static get scopes(): string[];

The scopes needed to make gRPC calls for every method defined in this service.

serviceManagerStub

serviceManagerStub?: Promise<{
        [name: string]: Function;
    }>;

servicePath

static get servicePath(): string;

The DNS address for this API service.

warn

warn: (code: string, message: string, warnType?: string) => void;

Methods

checkCreateServiceProgress(name)

checkCreateServiceProgress(name: string): Promise<LROperation<protos.google.api.servicemanagement.v1.ManagedService, protos.google.api.servicemanagement.v1.OperationMetadata>>;

Check the status of the long running operation returned by createService().

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.api.servicemanagement.v1.ManagedService, protos.google.api.servicemanagement.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Initial values for the service resource.
   */
  // const service = {}

  // Imports the Servicemanagement library
  const {ServiceManagerClient} = require('@google-cloud/service-management').v1;

  // Instantiates a client
  const servicemanagementClient = new ServiceManagerClient();

  async function callCreateService() {
    // Construct request
    const request = {
      service,
    };

    // Run request
    const [operation] = await servicemanagementClient.createService(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreateService();

checkCreateServiceRolloutProgress(name)

checkCreateServiceRolloutProgress(name: string): Promise<LROperation<protos.google.api.servicemanagement.v1.Rollout, protos.google.api.servicemanagement.v1.OperationMetadata>>;

Check the status of the long running operation returned by createServiceRollout().

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.api.servicemanagement.v1.Rollout, protos.google.api.servicemanagement.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the service.  See the overview (https://cloud.google.com/service-management/overview)
   *  for naming requirements.  For example: `example.googleapis.com`.
   */
  // const serviceName = 'abc123'
  /**
   *  Required. The rollout resource. The `service_name` field is output only.
   */
  // const rollout = {}

  // Imports the Servicemanagement library
  const {ServiceManagerClient} = require('@google-cloud/service-management').v1;

  // Instantiates a client
  const servicemanagementClient = new ServiceManagerClient();

  async function callCreateServiceRollout() {
    // Construct request
    const request = {
      serviceName,
      rollout,
    };

    // Run request
    const [operation] = await servicemanagementClient.createServiceRollout(
      request
    );
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreateServiceRollout();

checkDeleteServiceProgress(name)

checkDeleteServiceProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.api.servicemanagement.v1.OperationMetadata>>;

Check the status of the long running operation returned by deleteService().

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.protobuf.Empty, protos.google.api.servicemanagement.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the service.  See the overview (https://cloud.google.com/service-management/overview)
   *  for naming requirements.  For example: `example.googleapis.com`.
   */
  // const serviceName = 'abc123'

  // Imports the Servicemanagement library
  const {ServiceManagerClient} = require('@google-cloud/service-management').v1;

  // Instantiates a client
  const servicemanagementClient = new ServiceManagerClient();

  async function callDeleteService() {
    // Construct request
    const request = {
      serviceName,
    };

    // Run request
    const [operation] = await servicemanagementClient.deleteService(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callDeleteService();

checkDisableServiceProgress(name)

checkDisableServiceProgress(name: string): Promise<LROperation<protos.google.api.servicemanagement.v1.DisableServiceResponse, protos.google.api.servicemanagement.v1.OperationMetadata>>;

Check the status of the long running operation returned by disableService().

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.api.servicemanagement.v1.DisableServiceResponse, protos.google.api.servicemanagement.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Name of the service to disable. Specifying an unknown service name
   *  will cause the request to fail.
   */
  // const serviceName = 'abc123'
  /**
   *  Required. The identity of consumer resource which service disablement will be
   *  applied to.
   *  The Google Service Management implementation accepts the following
   *  forms:
   *  - "project:

checkEnableServiceProgress(name)

checkEnableServiceProgress(name: string): Promise<LROperation<protos.google.api.servicemanagement.v1.EnableServiceResponse, protos.google.api.servicemanagement.v1.OperationMetadata>>;

Check the status of the long running operation returned by enableService().

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.api.servicemanagement.v1.EnableServiceResponse, protos.google.api.servicemanagement.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Name of the service to enable. Specifying an unknown service name will
   *  cause the request to fail.
   */
  // const serviceName = 'abc123'
  /**
   *  Required. The identity of consumer resource which service enablement will be
   *  applied to.
   *  The Google Service Management implementation accepts the following
   *  forms:
   *  - "project:

checkSubmitConfigSourceProgress(name)

checkSubmitConfigSourceProgress(name: string): Promise<LROperation<protos.google.api.servicemanagement.v1.SubmitConfigSourceResponse, protos.google.api.servicemanagement.v1.OperationMetadata>>;

Check the status of the long running operation returned by submitConfigSource().

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.api.servicemanagement.v1.SubmitConfigSourceResponse, protos.google.api.servicemanagement.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the service.  See the overview (https://cloud.google.com/service-management/overview)
   *  for naming requirements.  For example: `example.googleapis.com`.
   */
  // const serviceName = 'abc123'
  /**
   *  Required. The source configuration for the service.
   */
  // const configSource = {}
  /**
   *  Optional. If set, this will result in the generation of a
   *  `google.api.Service` configuration based on the `ConfigSource` provided,
   *  but the generated config and the sources will NOT be persisted.
   */
  // const validateOnly = true

  // Imports the Servicemanagement library
  const {ServiceManagerClient} = require('@google-cloud/service-management').v1;

  // Instantiates a client
  const servicemanagementClient = new ServiceManagerClient();

  async function callSubmitConfigSource() {
    // Construct request
    const request = {
      serviceName,
      configSource,
    };

    // Run request
    const [operation] = await servicemanagementClient.submitConfigSource(
      request
    );
    const [response] = await operation.promise();
    console.log(response);
  }

  callSubmitConfigSource();

checkUndeleteServiceProgress(name)

checkUndeleteServiceProgress(name: string): Promise<LROperation<protos.google.api.servicemanagement.v1.UndeleteServiceResponse, protos.google.api.servicemanagement.v1.OperationMetadata>>;

Check the status of the long running operation returned by undeleteService().

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.api.servicemanagement.v1.UndeleteServiceResponse, protos.google.api.servicemanagement.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the service. See the overview (https://cloud.google.com/service-management/overview)
   *  for naming requirements. For example: `example.googleapis.com`.
   */
  // const serviceName = 'abc123'

  // Imports the Servicemanagement library
  const {ServiceManagerClient} = require('@google-cloud/service-management').v1;

  // Instantiates a client
  const servicemanagementClient = new ServiceManagerClient();

  async function callUndeleteService() {
    // Construct request
    const request = {
      serviceName,
    };

    // Run request
    const [operation] = await servicemanagementClient.undeleteService(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callUndeleteService();

close()

close(): Promise<void>;

Terminate the gRPC channel and close the client.

The client will no longer be usable and all future behavior is undefined.

Returns
TypeDescription
Promise<void>

{Promise} A promise that resolves when the client is closed.

createService(request, options)

createService(request?: protos.google.api.servicemanagement.v1.ICreateServiceRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.api.servicemanagement.v1.IManagedService, protos.google.api.servicemanagement.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Creates a new managed service. Please note one producer project can own no more than 20 services.

Operation<response: ManagedService>

Parameters
NameDescription
request protos.google.api.servicemanagement.v1.ICreateServiceRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.api.servicemanagement.v1.IManagedService, protos.google.api.servicemanagement.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Initial values for the service resource.
   */
  // const service = {}

  // Imports the Servicemanagement library
  const {ServiceManagerClient} = require('@google-cloud/service-management').v1;

  // Instantiates a client
  const servicemanagementClient = new ServiceManagerClient();

  async function callCreateService() {
    // Construct request
    const request = {
      service,
    };

    // Run request
    const [operation] = await servicemanagementClient.createService(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreateService();

createService(request, options, callback)

createService(request: protos.google.api.servicemanagement.v1.ICreateServiceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.api.servicemanagement.v1.IManagedService, protos.google.api.servicemanagement.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.api.servicemanagement.v1.ICreateServiceRequest
options CallOptions
callback Callback<LROperation<protos.google.api.servicemanagement.v1.IManagedService, protos.google.api.servicemanagement.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createService(request, callback)

createService(request: protos.google.api.servicemanagement.v1.ICreateServiceRequest, callback: Callback<LROperation<protos.google.api.servicemanagement.v1.IManagedService, protos.google.api.servicemanagement.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.api.servicemanagement.v1.ICreateServiceRequest
callback Callback<LROperation<protos.google.api.servicemanagement.v1.IManagedService, protos.google.api.servicemanagement.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createServiceConfig(request, options)

createServiceConfig(request?: protos.google.api.servicemanagement.v1.ICreateServiceConfigRequest, options?: CallOptions): Promise<[
        protos.google.api.IService,
        (protos.google.api.servicemanagement.v1.ICreateServiceConfigRequest | undefined),
        {} | undefined
    ]>;

Creates a new service configuration (version) for a managed service. This method only stores the service configuration. To roll out the service configuration to backend systems please call .

Only the 100 most recent service configurations and ones referenced by existing rollouts are kept for each service. The rest will be deleted eventually.

Parameters
NameDescription
request protos.google.api.servicemanagement.v1.ICreateServiceConfigRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.api.IService, (protos.google.api.servicemanagement.v1.ICreateServiceConfigRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [Service]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the service.  See the overview (https://cloud.google.com/service-management/overview)
   *  for naming requirements.  For example: `example.googleapis.com`.
   */
  // const serviceName = 'abc123'
  /**
   *  Required. The service configuration resource.
   */
  // const serviceConfig = {}

  // Imports the Servicemanagement library
  const {ServiceManagerClient} = require('@google-cloud/service-management').v1;

  // Instantiates a client
  const servicemanagementClient = new ServiceManagerClient();

  async function callCreateServiceConfig() {
    // Construct request
    const request = {
      serviceName,
      serviceConfig,
    };

    // Run request
    const response = await servicemanagementClient.createServiceConfig(request);
    console.log(response);
  }

  callCreateServiceConfig();

createServiceConfig(request, options, callback)

createServiceConfig(request: protos.google.api.servicemanagement.v1.ICreateServiceConfigRequest, options: CallOptions, callback: Callback<protos.google.api.IService, protos.google.api.servicemanagement.v1.ICreateServiceConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.api.servicemanagement.v1.ICreateServiceConfigRequest
options CallOptions
callback Callback<protos.google.api.IService, protos.google.api.servicemanagement.v1.ICreateServiceConfigRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createServiceConfig(request, callback)

createServiceConfig(request: protos.google.api.servicemanagement.v1.ICreateServiceConfigRequest, callback: Callback<protos.google.api.IService, protos.google.api.servicemanagement.v1.ICreateServiceConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.api.servicemanagement.v1.ICreateServiceConfigRequest
callback Callback<protos.google.api.IService, protos.google.api.servicemanagement.v1.ICreateServiceConfigRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createServiceRollout(request, options)

createServiceRollout(request?: protos.google.api.servicemanagement.v1.ICreateServiceRolloutRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.api.servicemanagement.v1.IRollout, protos.google.api.servicemanagement.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Creates a new service configuration rollout. Based on rollout, the Google Service Management will roll out the service configurations to different backend services. For example, the logging configuration will be pushed to Google Cloud Logging.

Please note that any previous pending and running Rollouts and associated Operations will be automatically cancelled so that the latest Rollout will not be blocked by previous Rollouts.

Only the 100 most recent (in any state) and the last 10 successful (if not already part of the set of 100 most recent) rollouts are kept for each service. The rest will be deleted eventually.

Operation<response: Rollout>

Parameters
NameDescription
request protos.google.api.servicemanagement.v1.ICreateServiceRolloutRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.api.servicemanagement.v1.IRollout, protos.google.api.servicemanagement.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the service.  See the overview (https://cloud.google.com/service-management/overview)
   *  for naming requirements.  For example: `example.googleapis.com`.
   */
  // const serviceName = 'abc123'
  /**
   *  Required. The rollout resource. The `service_name` field is output only.
   */
  // const rollout = {}

  // Imports the Servicemanagement library
  const {ServiceManagerClient} = require('@google-cloud/service-management').v1;

  // Instantiates a client
  const servicemanagementClient = new ServiceManagerClient();

  async function callCreateServiceRollout() {
    // Construct request
    const request = {
      serviceName,
      rollout,
    };

    // Run request
    const [operation] = await servicemanagementClient.createServiceRollout(
      request
    );
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreateServiceRollout();

createServiceRollout(request, options, callback)

createServiceRollout(request: protos.google.api.servicemanagement.v1.ICreateServiceRolloutRequest, options: CallOptions, callback: Callback<LROperation<protos.google.api.servicemanagement.v1.IRollout, protos.google.api.servicemanagement.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.api.servicemanagement.v1.ICreateServiceRolloutRequest
options CallOptions
callback Callback<LROperation<protos.google.api.servicemanagement.v1.IRollout, protos.google.api.servicemanagement.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createServiceRollout(request, callback)

createServiceRollout(request: protos.google.api.servicemanagement.v1.ICreateServiceRolloutRequest, callback: Callback<LROperation<protos.google.api.servicemanagement.v1.IRollout, protos.google.api.servicemanagement.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.api.servicemanagement.v1.ICreateServiceRolloutRequest
callback Callback<LROperation<protos.google.api.servicemanagement.v1.IRollout, protos.google.api.servicemanagement.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteService(request, options)

deleteService(request?: protos.google.api.servicemanagement.v1.IDeleteServiceRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.protobuf.IEmpty, protos.google.api.servicemanagement.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Deletes a managed service. This method will change the service to the Soft-Delete state for 30 days. Within this period, service producers may call to restore the service. After 30 days, the service will be permanently deleted.

Operation<response: google.protobuf.Empty>

Parameters
NameDescription
request protos.google.api.servicemanagement.v1.IDeleteServiceRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.api.servicemanagement.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the service.  See the overview (https://cloud.google.com/service-management/overview)
   *  for naming requirements.  For example: `example.googleapis.com`.
   */
  // const serviceName = 'abc123'

  // Imports the Servicemanagement library
  const {ServiceManagerClient} = require('@google-cloud/service-management').v1;

  // Instantiates a client
  const servicemanagementClient = new ServiceManagerClient();

  async function callDeleteService() {
    // Construct request
    const request = {
      serviceName,
    };

    // Run request
    const [operation] = await servicemanagementClient.deleteService(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callDeleteService();

deleteService(request, options, callback)

deleteService(request: protos.google.api.servicemanagement.v1.IDeleteServiceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.api.servicemanagement.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.api.servicemanagement.v1.IDeleteServiceRequest
options CallOptions
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.api.servicemanagement.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteService(request, callback)

deleteService(request: protos.google.api.servicemanagement.v1.IDeleteServiceRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.api.servicemanagement.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.api.servicemanagement.v1.IDeleteServiceRequest
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.api.servicemanagement.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

disableService(request, options)

disableService(request?: protos.google.api.servicemanagement.v1.IDisableServiceRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.api.servicemanagement.v1.IDisableServiceResponse, protos.google.api.servicemanagement.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Disables a for a project, so it can no longer be be used for the project. It prevents accidental usage that may cause unexpected billing charges or security leaks.

Operation<response: DisableServiceResponse>

Parameters
NameDescription
request protos.google.api.servicemanagement.v1.IDisableServiceRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.api.servicemanagement.v1.IDisableServiceResponse, protos.google.api.servicemanagement.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Name of the service to disable. Specifying an unknown service name
   *  will cause the request to fail.
   */
  // const serviceName = 'abc123'
  /**
   *  Required. The identity of consumer resource which service disablement will be
   *  applied to.
   *  The Google Service Management implementation accepts the following
   *  forms:
   *  - "project:

disableService(request, options, callback)

disableService(request: protos.google.api.servicemanagement.v1.IDisableServiceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.api.servicemanagement.v1.IDisableServiceResponse, protos.google.api.servicemanagement.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.api.servicemanagement.v1.IDisableServiceRequest
options CallOptions
callback Callback<LROperation<protos.google.api.servicemanagement.v1.IDisableServiceResponse, protos.google.api.servicemanagement.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

disableService(request, callback)

disableService(request: protos.google.api.servicemanagement.v1.IDisableServiceRequest, callback: Callback<LROperation<protos.google.api.servicemanagement.v1.IDisableServiceResponse, protos.google.api.servicemanagement.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.api.servicemanagement.v1.IDisableServiceRequest
callback Callback<LROperation<protos.google.api.servicemanagement.v1.IDisableServiceResponse, protos.google.api.servicemanagement.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

enableService(request, options)

enableService(request?: protos.google.api.servicemanagement.v1.IEnableServiceRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.api.servicemanagement.v1.IEnableServiceResponse, protos.google.api.servicemanagement.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Enables a for a project, so it can be used for the project. See [Cloud Auth Guide](https://cloud.google.com/docs/authentication) for more information.

Operation<response: EnableServiceResponse>

Parameters
NameDescription
request protos.google.api.servicemanagement.v1.IEnableServiceRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.api.servicemanagement.v1.IEnableServiceResponse, protos.google.api.servicemanagement.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Name of the service to enable. Specifying an unknown service name will
   *  cause the request to fail.
   */
  // const serviceName = 'abc123'
  /**
   *  Required. The identity of consumer resource which service enablement will be
   *  applied to.
   *  The Google Service Management implementation accepts the following
   *  forms:
   *  - "project:

enableService(request, options, callback)

enableService(request: protos.google.api.servicemanagement.v1.IEnableServiceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.api.servicemanagement.v1.IEnableServiceResponse, protos.google.api.servicemanagement.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.api.servicemanagement.v1.IEnableServiceRequest
options CallOptions
callback Callback<LROperation<protos.google.api.servicemanagement.v1.IEnableServiceResponse, protos.google.api.servicemanagement.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

enableService(request, callback)

enableService(request: protos.google.api.servicemanagement.v1.IEnableServiceRequest, callback: Callback<LROperation<protos.google.api.servicemanagement.v1.IEnableServiceResponse, protos.google.api.servicemanagement.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.api.servicemanagement.v1.IEnableServiceRequest
callback Callback<LROperation<protos.google.api.servicemanagement.v1.IEnableServiceResponse, protos.google.api.servicemanagement.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

generateConfigReport(request, options)

generateConfigReport(request?: protos.google.api.servicemanagement.v1.IGenerateConfigReportRequest, options?: CallOptions): Promise<[
        protos.google.api.servicemanagement.v1.IGenerateConfigReportResponse,
        (protos.google.api.servicemanagement.v1.IGenerateConfigReportRequest | undefined),
        {} | undefined
    ]>;

Generates and returns a report (errors, warnings and changes from existing configurations) associated with GenerateConfigReportRequest.new_value

If GenerateConfigReportRequest.old_value is specified, GenerateConfigReportRequest will contain a single ChangeReport based on the comparison between GenerateConfigReportRequest.new_value and GenerateConfigReportRequest.old_value. If GenerateConfigReportRequest.old_value is not specified, this method will compare GenerateConfigReportRequest.new_value with the last pushed service configuration.

Parameters
NameDescription
request protos.google.api.servicemanagement.v1.IGenerateConfigReportRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.api.servicemanagement.v1.IGenerateConfigReportResponse, (protos.google.api.servicemanagement.v1.IGenerateConfigReportRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [GenerateConfigReportResponse]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Service configuration for which we want to generate the report.
   *  For this version of API, the supported types are
   *  google.api.servicemanagement.v1.ConfigRef google.api.servicemanagement.v1.ConfigRef,
   *  google.api.servicemanagement.v1.ConfigSource google.api.servicemanagement.v1.ConfigSource,
   *  and google.api.Service google.api.Service
   */
  // const newConfig = {}
  /**
   *  Optional. Service configuration against which the comparison will be done.
   *  For this version of API, the supported types are
   *  google.api.servicemanagement.v1.ConfigRef google.api.servicemanagement.v1.ConfigRef,
   *  google.api.servicemanagement.v1.ConfigSource google.api.servicemanagement.v1.ConfigSource,
   *  and google.api.Service google.api.Service
   */
  // const oldConfig = {}

  // Imports the Servicemanagement library
  const {ServiceManagerClient} = require('@google-cloud/service-management').v1;

  // Instantiates a client
  const servicemanagementClient = new ServiceManagerClient();

  async function callGenerateConfigReport() {
    // Construct request
    const request = {
      newConfig,
    };

    // Run request
    const response = await servicemanagementClient.generateConfigReport(
      request
    );
    console.log(response);
  }

  callGenerateConfigReport();

generateConfigReport(request, options, callback)

generateConfigReport(request: protos.google.api.servicemanagement.v1.IGenerateConfigReportRequest, options: CallOptions, callback: Callback<protos.google.api.servicemanagement.v1.IGenerateConfigReportResponse, protos.google.api.servicemanagement.v1.IGenerateConfigReportRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.api.servicemanagement.v1.IGenerateConfigReportRequest
options CallOptions
callback Callback<protos.google.api.servicemanagement.v1.IGenerateConfigReportResponse, protos.google.api.servicemanagement.v1.IGenerateConfigReportRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

generateConfigReport(request, callback)

generateConfigReport(request: protos.google.api.servicemanagement.v1.IGenerateConfigReportRequest, callback: Callback<protos.google.api.servicemanagement.v1.IGenerateConfigReportResponse, protos.google.api.servicemanagement.v1.IGenerateConfigReportRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.api.servicemanagement.v1.IGenerateConfigReportRequest
callback Callback<protos.google.api.servicemanagement.v1.IGenerateConfigReportResponse, protos.google.api.servicemanagement.v1.IGenerateConfigReportRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getProjectId()

getProjectId(): Promise<string>;
Returns
TypeDescription
Promise<string>

getProjectId(callback)

getProjectId(callback: Callback<string, undefined, undefined>): void;
Parameter
NameDescription
callback Callback<string, undefined, undefined>
Returns
TypeDescription
void

getService(request, options)

getService(request?: protos.google.api.servicemanagement.v1.IGetServiceRequest, options?: CallOptions): Promise<[
        protos.google.api.servicemanagement.v1.IManagedService,
        protos.google.api.servicemanagement.v1.IGetServiceRequest | undefined,
        {} | undefined
    ]>;

Gets a managed service. Authentication is required unless the service is public.

Parameters
NameDescription
request protos.google.api.servicemanagement.v1.IGetServiceRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.api.servicemanagement.v1.IManagedService, protos.google.api.servicemanagement.v1.IGetServiceRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [ManagedService]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the service.  See the `ServiceManager` overview for naming
   *  requirements.  For example: `example.googleapis.com`.
   */
  // const serviceName = 'abc123'

  // Imports the Servicemanagement library
  const {ServiceManagerClient} = require('@google-cloud/service-management').v1;

  // Instantiates a client
  const servicemanagementClient = new ServiceManagerClient();

  async function callGetService() {
    // Construct request
    const request = {
      serviceName,
    };

    // Run request
    const response = await servicemanagementClient.getService(request);
    console.log(response);
  }

  callGetService();

getService(request, options, callback)

getService(request: protos.google.api.servicemanagement.v1.IGetServiceRequest, options: CallOptions, callback: Callback<protos.google.api.servicemanagement.v1.IManagedService, protos.google.api.servicemanagement.v1.IGetServiceRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.api.servicemanagement.v1.IGetServiceRequest
options CallOptions
callback Callback<protos.google.api.servicemanagement.v1.IManagedService, protos.google.api.servicemanagement.v1.IGetServiceRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getService(request, callback)

getService(request: protos.google.api.servicemanagement.v1.IGetServiceRequest, callback: Callback<protos.google.api.servicemanagement.v1.IManagedService, protos.google.api.servicemanagement.v1.IGetServiceRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.api.servicemanagement.v1.IGetServiceRequest
callback Callback<protos.google.api.servicemanagement.v1.IManagedService, protos.google.api.servicemanagement.v1.IGetServiceRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getServiceConfig(request, options)

getServiceConfig(request?: protos.google.api.servicemanagement.v1.IGetServiceConfigRequest, options?: CallOptions): Promise<[
        protos.google.api.IService,
        (protos.google.api.servicemanagement.v1.IGetServiceConfigRequest | undefined),
        {} | undefined
    ]>;

Gets a service configuration (version) for a managed service.

Parameters
NameDescription
request protos.google.api.servicemanagement.v1.IGetServiceConfigRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.api.IService, (protos.google.api.servicemanagement.v1.IGetServiceConfigRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [Service]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the service.  See the overview (https://cloud.google.com/service-management/overview)
   *  for naming requirements.  For example: `example.googleapis.com`.
   */
  // const serviceName = 'abc123'
  /**
   *  Required. The id of the service configuration resource.
   *  This field must be specified for the server to return all fields, including
   *  `SourceInfo`.
   */
  // const configId = 'abc123'
  /**
   *  Specifies which parts of the Service Config should be returned in the
   *  response.
   */
  // const view = {}

  // Imports the Servicemanagement library
  const {ServiceManagerClient} = require('@google-cloud/service-management').v1;

  // Instantiates a client
  const servicemanagementClient = new ServiceManagerClient();

  async function callGetServiceConfig() {
    // Construct request
    const request = {
      serviceName,
      configId,
    };

    // Run request
    const response = await servicemanagementClient.getServiceConfig(request);
    console.log(response);
  }

  callGetServiceConfig();

getServiceConfig(request, options, callback)

getServiceConfig(request: protos.google.api.servicemanagement.v1.IGetServiceConfigRequest, options: CallOptions, callback: Callback<protos.google.api.IService, protos.google.api.servicemanagement.v1.IGetServiceConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.api.servicemanagement.v1.IGetServiceConfigRequest
options CallOptions
callback Callback<protos.google.api.IService, protos.google.api.servicemanagement.v1.IGetServiceConfigRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getServiceConfig(request, callback)

getServiceConfig(request: protos.google.api.servicemanagement.v1.IGetServiceConfigRequest, callback: Callback<protos.google.api.IService, protos.google.api.servicemanagement.v1.IGetServiceConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.api.servicemanagement.v1.IGetServiceConfigRequest
callback Callback<protos.google.api.IService, protos.google.api.servicemanagement.v1.IGetServiceConfigRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getServiceRollout(request, options)

getServiceRollout(request?: protos.google.api.servicemanagement.v1.IGetServiceRolloutRequest, options?: CallOptions): Promise<[
        protos.google.api.servicemanagement.v1.IRollout,
        (protos.google.api.servicemanagement.v1.IGetServiceRolloutRequest | undefined),
        {} | undefined
    ]>;

Gets a service configuration .

Parameters
NameDescription
request protos.google.api.servicemanagement.v1.IGetServiceRolloutRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.api.servicemanagement.v1.IRollout, (protos.google.api.servicemanagement.v1.IGetServiceRolloutRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [Rollout]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the service.  See the overview (https://cloud.google.com/service-management/overview)
   *  for naming requirements.  For example: `example.googleapis.com`.
   */
  // const serviceName = 'abc123'
  /**
   *  Required. The id of the rollout resource.
   */
  // const rolloutId = 'abc123'

  // Imports the Servicemanagement library
  const {ServiceManagerClient} = require('@google-cloud/service-management').v1;

  // Instantiates a client
  const servicemanagementClient = new ServiceManagerClient();

  async function callGetServiceRollout() {
    // Construct request
    const request = {
      serviceName,
      rolloutId,
    };

    // Run request
    const response = await servicemanagementClient.getServiceRollout(request);
    console.log(response);
  }

  callGetServiceRollout();

getServiceRollout(request, options, callback)

getServiceRollout(request: protos.google.api.servicemanagement.v1.IGetServiceRolloutRequest, options: CallOptions, callback: Callback<protos.google.api.servicemanagement.v1.IRollout, protos.google.api.servicemanagement.v1.IGetServiceRolloutRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.api.servicemanagement.v1.IGetServiceRolloutRequest
options CallOptions
callback Callback<protos.google.api.servicemanagement.v1.IRollout, protos.google.api.servicemanagement.v1.IGetServiceRolloutRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getServiceRollout(request, callback)

getServiceRollout(request: protos.google.api.servicemanagement.v1.IGetServiceRolloutRequest, callback: Callback<protos.google.api.servicemanagement.v1.IRollout, protos.google.api.servicemanagement.v1.IGetServiceRolloutRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.api.servicemanagement.v1.IGetServiceRolloutRequest
callback Callback<protos.google.api.servicemanagement.v1.IRollout, protos.google.api.servicemanagement.v1.IGetServiceRolloutRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

initialize()

initialize(): Promise<{
        [name: string]: Function;
    }>;

Initialize the client. Performs asynchronous operations (such as authentication) and prepares the client. This function will be called automatically when any class method is called for the first time, but if you need to initialize it before calling an actual method, feel free to call initialize() directly.

You can await on this method if you want to make sure the client is initialized.

Returns
TypeDescription
Promise<{ [name: string]: Function; }>

{Promise} A promise that resolves to an authenticated service stub.

listServiceConfigs(request, options)

listServiceConfigs(request?: protos.google.api.servicemanagement.v1.IListServiceConfigsRequest, options?: CallOptions): Promise<[
        protos.google.api.IService[],
        protos.google.api.servicemanagement.v1.IListServiceConfigsRequest | null,
        protos.google.api.servicemanagement.v1.IListServiceConfigsResponse
    ]>;

Lists the history of the service configuration for a managed service, from the newest to the oldest.

Parameters
NameDescription
request protos.google.api.servicemanagement.v1.IListServiceConfigsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.api.IService[], protos.google.api.servicemanagement.v1.IListServiceConfigsRequest | null, protos.google.api.servicemanagement.v1.IListServiceConfigsResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of [Service]. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listServiceConfigsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listServiceConfigs(request, options, callback)

listServiceConfigs(request: protos.google.api.servicemanagement.v1.IListServiceConfigsRequest, options: CallOptions, callback: PaginationCallback<protos.google.api.servicemanagement.v1.IListServiceConfigsRequest, protos.google.api.servicemanagement.v1.IListServiceConfigsResponse | null | undefined, protos.google.api.IService>): void;
Parameters
NameDescription
request protos.google.api.servicemanagement.v1.IListServiceConfigsRequest
options CallOptions
callback PaginationCallback<protos.google.api.servicemanagement.v1.IListServiceConfigsRequest, protos.google.api.servicemanagement.v1.IListServiceConfigsResponse | null | undefined, protos.google.api.IService>
Returns
TypeDescription
void

listServiceConfigs(request, callback)

listServiceConfigs(request: protos.google.api.servicemanagement.v1.IListServiceConfigsRequest, callback: PaginationCallback<protos.google.api.servicemanagement.v1.IListServiceConfigsRequest, protos.google.api.servicemanagement.v1.IListServiceConfigsResponse | null | undefined, protos.google.api.IService>): void;
Parameters
NameDescription
request protos.google.api.servicemanagement.v1.IListServiceConfigsRequest
callback PaginationCallback<protos.google.api.servicemanagement.v1.IListServiceConfigsRequest, protos.google.api.servicemanagement.v1.IListServiceConfigsResponse | null | undefined, protos.google.api.IService>
Returns
TypeDescription
void

listServiceConfigsAsync(request, options)

listServiceConfigsAsync(request?: protos.google.api.servicemanagement.v1.IListServiceConfigsRequest, options?: CallOptions): AsyncIterable<protos.google.api.IService>;

Equivalent to listServiceConfigs, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
NameDescription
request protos.google.api.servicemanagement.v1.IListServiceConfigsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.api.IService>

{Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing [Service]. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the service.  See the overview (https://cloud.google.com/service-management/overview)
   *  for naming requirements.  For example: `example.googleapis.com`.
   */
  // const serviceName = 'abc123'
  /**
   *  The token of the page to retrieve.
   */
  // const pageToken = 'abc123'
  /**
   *  The max number of items to include in the response list. Page size is 50
   *  if not specified. Maximum value is 100.
   */
  // const pageSize = 1234

  // Imports the Servicemanagement library
  const {ServiceManagerClient} = require('@google-cloud/service-management').v1;

  // Instantiates a client
  const servicemanagementClient = new ServiceManagerClient();

  async function callListServiceConfigs() {
    // Construct request
    const request = {
      serviceName,
    };

    // Run request
    const iterable = await servicemanagementClient.listServiceConfigsAsync(
      request
    );
    for await (const response of iterable) {
      console.log(response);
    }
  }

  callListServiceConfigs();

listServiceConfigsStream(request, options)

listServiceConfigsStream(request?: protos.google.api.servicemanagement.v1.IListServiceConfigsRequest, options?: CallOptions): Transform;

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters
NameDescription
request protos.google.api.servicemanagement.v1.IListServiceConfigsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{Stream} An object stream which emits an object representing [Service] on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listServiceConfigsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listServiceRollouts(request, options)

listServiceRollouts(request?: protos.google.api.servicemanagement.v1.IListServiceRolloutsRequest, options?: CallOptions): Promise<[
        protos.google.api.servicemanagement.v1.IRollout[],
        protos.google.api.servicemanagement.v1.IListServiceRolloutsRequest | null,
        protos.google.api.servicemanagement.v1.IListServiceRolloutsResponse
    ]>;

Lists the history of the service configuration rollouts for a managed service, from the newest to the oldest.

Parameters
NameDescription
request protos.google.api.servicemanagement.v1.IListServiceRolloutsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.api.servicemanagement.v1.IRollout[], protos.google.api.servicemanagement.v1.IListServiceRolloutsRequest | null, protos.google.api.servicemanagement.v1.IListServiceRolloutsResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of [Rollout]. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listServiceRolloutsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listServiceRollouts(request, options, callback)

listServiceRollouts(request: protos.google.api.servicemanagement.v1.IListServiceRolloutsRequest, options: CallOptions, callback: PaginationCallback<protos.google.api.servicemanagement.v1.IListServiceRolloutsRequest, protos.google.api.servicemanagement.v1.IListServiceRolloutsResponse | null | undefined, protos.google.api.servicemanagement.v1.IRollout>): void;
Parameters
NameDescription
request protos.google.api.servicemanagement.v1.IListServiceRolloutsRequest
options CallOptions
callback PaginationCallback<protos.google.api.servicemanagement.v1.IListServiceRolloutsRequest, protos.google.api.servicemanagement.v1.IListServiceRolloutsResponse | null | undefined, protos.google.api.servicemanagement.v1.IRollout>
Returns
TypeDescription
void

listServiceRollouts(request, callback)

listServiceRollouts(request: protos.google.api.servicemanagement.v1.IListServiceRolloutsRequest, callback: PaginationCallback<protos.google.api.servicemanagement.v1.IListServiceRolloutsRequest, protos.google.api.servicemanagement.v1.IListServiceRolloutsResponse | null | undefined, protos.google.api.servicemanagement.v1.IRollout>): void;
Parameters
NameDescription
request protos.google.api.servicemanagement.v1.IListServiceRolloutsRequest
callback PaginationCallback<protos.google.api.servicemanagement.v1.IListServiceRolloutsRequest, protos.google.api.servicemanagement.v1.IListServiceRolloutsResponse | null | undefined, protos.google.api.servicemanagement.v1.IRollout>
Returns
TypeDescription
void

listServiceRolloutsAsync(request, options)

listServiceRolloutsAsync(request?: protos.google.api.servicemanagement.v1.IListServiceRolloutsRequest, options?: CallOptions): AsyncIterable<protos.google.api.servicemanagement.v1.IRollout>;

Equivalent to listServiceRollouts, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
NameDescription
request protos.google.api.servicemanagement.v1.IListServiceRolloutsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.api.servicemanagement.v1.IRollout>

{Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing [Rollout]. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the service.  See the overview (https://cloud.google.com/service-management/overview)
   *  for naming requirements.  For example: `example.googleapis.com`.
   */
  // const serviceName = 'abc123'
  /**
   *  The token of the page to retrieve.
   */
  // const pageToken = 'abc123'
  /**
   *  The max number of items to include in the response list. Page size is 50
   *  if not specified. Maximum value is 100.
   */
  // const pageSize = 1234
  /**
   *  Required. Use `filter` to return subset of rollouts.
   *  The following filters are supported:
   *    -- To limit the results to only those in
   *       status (google.api.servicemanagement.v1.RolloutStatus) 'SUCCESS',
   *       use filter='status=SUCCESS'
   *    -- To limit the results to those in
   *       status (google.api.servicemanagement.v1.RolloutStatus) 'CANCELLED'
   *       or 'FAILED', use filter='status=CANCELLED OR status=FAILED'
   */
  // const filter = 'abc123'

  // Imports the Servicemanagement library
  const {ServiceManagerClient} = require('@google-cloud/service-management').v1;

  // Instantiates a client
  const servicemanagementClient = new ServiceManagerClient();

  async function callListServiceRollouts() {
    // Construct request
    const request = {
      serviceName,
      filter,
    };

    // Run request
    const iterable = await servicemanagementClient.listServiceRolloutsAsync(
      request
    );
    for await (const response of iterable) {
      console.log(response);
    }
  }

  callListServiceRollouts();

listServiceRolloutsStream(request, options)

listServiceRolloutsStream(request?: protos.google.api.servicemanagement.v1.IListServiceRolloutsRequest, options?: CallOptions): Transform;

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters
NameDescription
request protos.google.api.servicemanagement.v1.IListServiceRolloutsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{Stream} An object stream which emits an object representing [Rollout] on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listServiceRolloutsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listServices(request, options)

listServices(request?: protos.google.api.servicemanagement.v1.IListServicesRequest, options?: CallOptions): Promise<[
        protos.google.api.servicemanagement.v1.IManagedService[],
        protos.google.api.servicemanagement.v1.IListServicesRequest | null,
        protos.google.api.servicemanagement.v1.IListServicesResponse
    ]>;

Lists managed services.

Returns all public services. For authenticated users, also returns all services the calling user has "servicemanagement.services.get" permission for.

**BETA:** If the caller specifies the consumer_id, it returns only the services enabled on the consumer. The consumer_id must have the format of "project:{PROJECT-ID}".

Parameters
NameDescription
request protos.google.api.servicemanagement.v1.IListServicesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.api.servicemanagement.v1.IManagedService[], protos.google.api.servicemanagement.v1.IListServicesRequest | null, protos.google.api.servicemanagement.v1.IListServicesResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of [ManagedService]. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listServicesAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listServices(request, options, callback)

listServices(request: protos.google.api.servicemanagement.v1.IListServicesRequest, options: CallOptions, callback: PaginationCallback<protos.google.api.servicemanagement.v1.IListServicesRequest, protos.google.api.servicemanagement.v1.IListServicesResponse | null | undefined, protos.google.api.servicemanagement.v1.IManagedService>): void;
Parameters
NameDescription
request protos.google.api.servicemanagement.v1.IListServicesRequest
options CallOptions
callback PaginationCallback<protos.google.api.servicemanagement.v1.IListServicesRequest, protos.google.api.servicemanagement.v1.IListServicesResponse | null | undefined, protos.google.api.servicemanagement.v1.IManagedService>
Returns
TypeDescription
void

listServices(request, callback)

listServices(request: protos.google.api.servicemanagement.v1.IListServicesRequest, callback: PaginationCallback<protos.google.api.servicemanagement.v1.IListServicesRequest, protos.google.api.servicemanagement.v1.IListServicesResponse | null | undefined, protos.google.api.servicemanagement.v1.IManagedService>): void;
Parameters
NameDescription
request protos.google.api.servicemanagement.v1.IListServicesRequest
callback PaginationCallback<protos.google.api.servicemanagement.v1.IListServicesRequest, protos.google.api.servicemanagement.v1.IListServicesResponse | null | undefined, protos.google.api.servicemanagement.v1.IManagedService>
Returns
TypeDescription
void

listServicesAsync(request, options)

listServicesAsync(request?: protos.google.api.servicemanagement.v1.IListServicesRequest, options?: CallOptions): AsyncIterable<protos.google.api.servicemanagement.v1.IManagedService>;

Equivalent to listServices, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
NameDescription
request protos.google.api.servicemanagement.v1.IListServicesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.api.servicemanagement.v1.IManagedService>

{Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing [ManagedService]. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Include services produced by the specified project.
   */
  // const producerProjectId = 'abc123'
  /**
   *  The max number of items to include in the response list. Page size is 50
   *  if not specified. Maximum value is 100.
   */
  // const pageSize = 1234
  /**
   *  Token identifying which result to start with; returned by a previous list
   *  call.
   */
  // const pageToken = 'abc123'
  /**
   *  Include services consumed by the specified consumer.
   *  The Google Service Management implementation accepts the following
   *  forms:
   *  - project:

listServicesStream(request, options)

listServicesStream(request?: protos.google.api.servicemanagement.v1.IListServicesRequest, options?: CallOptions): Transform;

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters
NameDescription
request protos.google.api.servicemanagement.v1.IListServicesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{Stream} An object stream which emits an object representing [ManagedService] on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listServicesAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

submitConfigSource(request, options)

submitConfigSource(request?: protos.google.api.servicemanagement.v1.ISubmitConfigSourceRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.api.servicemanagement.v1.ISubmitConfigSourceResponse, protos.google.api.servicemanagement.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Creates a new service configuration (version) for a managed service based on user-supplied configuration source files (for example: OpenAPI Specification). This method stores the source configurations as well as the generated service configuration. To rollout the service configuration to other services, please call .

Only the 100 most recent configuration sources and ones referenced by existing service configurtions are kept for each service. The rest will be deleted eventually.

Operation<response: SubmitConfigSourceResponse>

Parameters
NameDescription
request protos.google.api.servicemanagement.v1.ISubmitConfigSourceRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.api.servicemanagement.v1.ISubmitConfigSourceResponse, protos.google.api.servicemanagement.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the service.  See the overview (https://cloud.google.com/service-management/overview)
   *  for naming requirements.  For example: `example.googleapis.com`.
   */
  // const serviceName = 'abc123'
  /**
   *  Required. The source configuration for the service.
   */
  // const configSource = {}
  /**
   *  Optional. If set, this will result in the generation of a
   *  `google.api.Service` configuration based on the `ConfigSource` provided,
   *  but the generated config and the sources will NOT be persisted.
   */
  // const validateOnly = true

  // Imports the Servicemanagement library
  const {ServiceManagerClient} = require('@google-cloud/service-management').v1;

  // Instantiates a client
  const servicemanagementClient = new ServiceManagerClient();

  async function callSubmitConfigSource() {
    // Construct request
    const request = {
      serviceName,
      configSource,
    };

    // Run request
    const [operation] = await servicemanagementClient.submitConfigSource(
      request
    );
    const [response] = await operation.promise();
    console.log(response);
  }

  callSubmitConfigSource();

submitConfigSource(request, options, callback)

submitConfigSource(request: protos.google.api.servicemanagement.v1.ISubmitConfigSourceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.api.servicemanagement.v1.ISubmitConfigSourceResponse, protos.google.api.servicemanagement.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.api.servicemanagement.v1.ISubmitConfigSourceRequest
options CallOptions
callback Callback<LROperation<protos.google.api.servicemanagement.v1.ISubmitConfigSourceResponse, protos.google.api.servicemanagement.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

submitConfigSource(request, callback)

submitConfigSource(request: protos.google.api.servicemanagement.v1.ISubmitConfigSourceRequest, callback: Callback<LROperation<protos.google.api.servicemanagement.v1.ISubmitConfigSourceResponse, protos.google.api.servicemanagement.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.api.servicemanagement.v1.ISubmitConfigSourceRequest
callback Callback<LROperation<protos.google.api.servicemanagement.v1.ISubmitConfigSourceResponse, protos.google.api.servicemanagement.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

undeleteService(request, options)

undeleteService(request?: protos.google.api.servicemanagement.v1.IUndeleteServiceRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.api.servicemanagement.v1.IUndeleteServiceResponse, protos.google.api.servicemanagement.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Revives a previously deleted managed service. The method restores the service using the configuration at the time the service was deleted. The target service must exist and must have been deleted within the last 30 days.

Operation<response: UndeleteServiceResponse>

Parameters
NameDescription
request protos.google.api.servicemanagement.v1.IUndeleteServiceRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.api.servicemanagement.v1.IUndeleteServiceResponse, protos.google.api.servicemanagement.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the service. See the overview (https://cloud.google.com/service-management/overview)
   *  for naming requirements. For example: `example.googleapis.com`.
   */
  // const serviceName = 'abc123'

  // Imports the Servicemanagement library
  const {ServiceManagerClient} = require('@google-cloud/service-management').v1;

  // Instantiates a client
  const servicemanagementClient = new ServiceManagerClient();

  async function callUndeleteService() {
    // Construct request
    const request = {
      serviceName,
    };

    // Run request
    const [operation] = await servicemanagementClient.undeleteService(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callUndeleteService();

undeleteService(request, options, callback)

undeleteService(request: protos.google.api.servicemanagement.v1.IUndeleteServiceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.api.servicemanagement.v1.IUndeleteServiceResponse, protos.google.api.servicemanagement.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.api.servicemanagement.v1.IUndeleteServiceRequest
options CallOptions
callback Callback<LROperation<protos.google.api.servicemanagement.v1.IUndeleteServiceResponse, protos.google.api.servicemanagement.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

undeleteService(request, callback)

undeleteService(request: protos.google.api.servicemanagement.v1.IUndeleteServiceRequest, callback: Callback<LROperation<protos.google.api.servicemanagement.v1.IUndeleteServiceResponse, protos.google.api.servicemanagement.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.api.servicemanagement.v1.IUndeleteServiceRequest
callback Callback<LROperation<protos.google.api.servicemanagement.v1.IUndeleteServiceResponse, protos.google.api.servicemanagement.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void