Google Cloud Service Management V1 Client - Class ServiceManagerClient (1.1.1)

Reference documentation and code samples for the Google Cloud Service Management V1 Client class ServiceManagerClient.

Service Description: Google Service Management API

This class is currently experimental and may be subject to changes.

Namespace

Google \ Cloud \ ServiceManagement \ V1 \ Client

Methods

__construct

Constructor.

Parameters
NameDescription
options array

Optional. Options for configuring the service API wrapper.

↳ apiEndpoint string

The address of the API remote host. May optionally include the port, formatted as "

↳ credentials string|array|FetchAuthTokenInterface|CredentialsWrapper

The credentials to be used by the client to authorize API calls. This option accepts either a path to a credentials file, or a decoded credentials file as a PHP array. Advanced usage: In addition, this option can also accept a pre-constructed Google\Auth\FetchAuthTokenInterface object or Google\ApiCore\CredentialsWrapper object. Note that when one of these objects are provided, any settings in $credentialsConfig will be ignored.

↳ credentialsConfig array

Options used to configure credentials, including auth token caching, for the client. For a full list of supporting configuration options, see Google\ApiCore\CredentialsWrapper::build() .

↳ disableRetries bool

Determines whether or not retries defined by the client configuration should be disabled. Defaults to false.

↳ clientConfig string|array

Client method configuration, including retry settings. This option can be either a path to a JSON file, or a PHP array containing the decoded JSON data. By default this settings points to the default client config file, which is provided in the resources folder.

↳ transport string|TransportInterface

The transport used for executing network requests. May be either the string rest or grpc. Defaults to grpc if gRPC support is detected on the system. Advanced usage: Additionally, it is possible to pass in an already instantiated Google\ApiCore\Transport\TransportInterface object. Note that when this object is provided, any settings in $transportConfig, and any $apiEndpoint setting, will be ignored.

↳ transportConfig array

Configuration options that will be used to construct the transport. Options for each supported transport type should be passed in a key for that transport. For example: $transportConfig = [ 'grpc' => [...], 'rest' => [...], ]; See the Google\ApiCore\Transport\GrpcTransport::build() and Google\ApiCore\Transport\RestTransport::build() methods for the supported options.

↳ clientCertSource callable

A callable which returns the client cert as a string. This can be used to provide a certificate and private key to the transport layer for mTLS.

createService

Creates a new managed service.

A managed service is immutable, and is subject to mandatory 30-day data retention. You cannot move a service or recreate it within 30 days after deletion.

One producer project can own no more than 500 services. For security and reliability purposes, a production service should be hosted in a dedicated producer project.

Operation<response: ManagedService>

The async variant is Google\Cloud\ServiceManagement\V1\Client\BaseClient\self::createServiceAsync() .

Parameters
NameDescription
request Google\Cloud\ServiceManagement\V1\CreateServiceRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.

Returns
TypeDescription
Google\ApiCore\OperationResponse

createServiceConfig

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 CreateServiceRollout.

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

The async variant is Google\Cloud\ServiceManagement\V1\Client\BaseClient\self::createServiceConfigAsync() .

Parameters
NameDescription
request Google\Cloud\ServiceManagement\V1\CreateServiceConfigRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.

Returns
TypeDescription
Google\Api\Service

createServiceRollout

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>

The async variant is Google\Cloud\ServiceManagement\V1\Client\BaseClient\self::createServiceRolloutAsync() .

Parameters
NameDescription
request Google\Cloud\ServiceManagement\V1\CreateServiceRolloutRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.

Returns
TypeDescription
Google\ApiCore\OperationResponse

deleteService

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 UndeleteService to restore the service. After 30 days, the service will be permanently deleted.

Operation<response: google.protobuf.Empty>

The async variant is Google\Cloud\ServiceManagement\V1\Client\BaseClient\self::deleteServiceAsync() .

Parameters
NameDescription
request Google\Cloud\ServiceManagement\V1\DeleteServiceRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.

Returns
TypeDescription
Google\ApiCore\OperationResponse

generateConfigReport

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.

The async variant is Google\Cloud\ServiceManagement\V1\Client\BaseClient\self::generateConfigReportAsync() .

Parameters
NameDescription
request Google\Cloud\ServiceManagement\V1\GenerateConfigReportRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.

Returns
TypeDescription
Google\Cloud\ServiceManagement\V1\GenerateConfigReportResponse

getService

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

The async variant is Google\Cloud\ServiceManagement\V1\Client\BaseClient\self::getServiceAsync() .

Parameters
NameDescription
request Google\Cloud\ServiceManagement\V1\GetServiceRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.

Returns
TypeDescription
Google\Cloud\ServiceManagement\V1\ManagedService

getServiceConfig

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

The async variant is Google\Cloud\ServiceManagement\V1\Client\BaseClient\self::getServiceConfigAsync() .

Parameters
NameDescription
request Google\Cloud\ServiceManagement\V1\GetServiceConfigRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.

Returns
TypeDescription
Google\Api\Service

getServiceRollout

Gets a service configuration rollout.

The async variant is Google\Cloud\ServiceManagement\V1\Client\BaseClient\self::getServiceRolloutAsync() .

Parameters
NameDescription
request Google\Cloud\ServiceManagement\V1\GetServiceRolloutRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.

Returns
TypeDescription
Google\Cloud\ServiceManagement\V1\Rollout

listServiceConfigs

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

The async variant is Google\Cloud\ServiceManagement\V1\Client\BaseClient\self::listServiceConfigsAsync() .

Parameters
NameDescription
request Google\Cloud\ServiceManagement\V1\ListServiceConfigsRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.

Returns
TypeDescription
Google\ApiCore\PagedListResponse

listServiceRollouts

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

The async variant is Google\Cloud\ServiceManagement\V1\Client\BaseClient\self::listServiceRolloutsAsync() .

Parameters
NameDescription
request Google\Cloud\ServiceManagement\V1\ListServiceRolloutsRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.

Returns
TypeDescription
Google\ApiCore\PagedListResponse

listServices

Lists managed services.

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

The async variant is Google\Cloud\ServiceManagement\V1\Client\BaseClient\self::listServicesAsync() .

Parameters
NameDescription
request Google\Cloud\ServiceManagement\V1\ListServicesRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.

Returns
TypeDescription
Google\ApiCore\PagedListResponse

submitConfigSource

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 CreateServiceRollout.

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>

The async variant is Google\Cloud\ServiceManagement\V1\Client\BaseClient\self::submitConfigSourceAsync() .

Parameters
NameDescription
request Google\Cloud\ServiceManagement\V1\SubmitConfigSourceRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.

Returns
TypeDescription
Google\ApiCore\OperationResponse

undeleteService

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>

The async variant is Google\Cloud\ServiceManagement\V1\Client\BaseClient\self::undeleteServiceAsync() .

Parameters
NameDescription
request Google\Cloud\ServiceManagement\V1\UndeleteServiceRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.

Returns
TypeDescription
Google\ApiCore\OperationResponse

createServiceAsync

Parameters
NameDescription
request Google\Cloud\ServiceManagement\V1\CreateServiceRequest
optionalArgs = [] array
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface

createServiceConfigAsync

Parameters
NameDescription
request Google\Cloud\ServiceManagement\V1\CreateServiceConfigRequest
optionalArgs = [] array
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface

createServiceRolloutAsync

Parameters
NameDescription
request Google\Cloud\ServiceManagement\V1\CreateServiceRolloutRequest
optionalArgs = [] array
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface

deleteServiceAsync

Parameters
NameDescription
request Google\Cloud\ServiceManagement\V1\DeleteServiceRequest
optionalArgs = [] array
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface

generateConfigReportAsync

Parameters
NameDescription
request Google\Cloud\ServiceManagement\V1\GenerateConfigReportRequest
optionalArgs = [] array
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface

getServiceAsync

Parameters
NameDescription
request Google\Cloud\ServiceManagement\V1\GetServiceRequest
optionalArgs = [] array
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface

getServiceConfigAsync

Parameters
NameDescription
request Google\Cloud\ServiceManagement\V1\GetServiceConfigRequest
optionalArgs = [] array
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface

getServiceRolloutAsync

Parameters
NameDescription
request Google\Cloud\ServiceManagement\V1\GetServiceRolloutRequest
optionalArgs = [] array
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface

listServiceConfigsAsync

Parameters
NameDescription
request Google\Cloud\ServiceManagement\V1\ListServiceConfigsRequest
optionalArgs = [] array
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface

listServiceRolloutsAsync

Parameters
NameDescription
request Google\Cloud\ServiceManagement\V1\ListServiceRolloutsRequest
optionalArgs = [] array
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface

listServicesAsync

Parameters
NameDescription
request Google\Cloud\ServiceManagement\V1\ListServicesRequest
optionalArgs = [] array
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface

submitConfigSourceAsync

Parameters
NameDescription
request Google\Cloud\ServiceManagement\V1\SubmitConfigSourceRequest
optionalArgs = [] array
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface

undeleteServiceAsync

Parameters
NameDescription
request Google\Cloud\ServiceManagement\V1\UndeleteServiceRequest
optionalArgs = [] array
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface

getOperationsClient

Return an OperationsClient object with the same endpoint as $this.

Returns
TypeDescription
Google\ApiCore\LongRunning\OperationsClient

resumeOperation

Resume an existing long running operation that was previously started by a long running API method. If $methodName is not provided, or does not match a long running API method, then the operation can still be resumed, but the OperationResponse object will not deserialize the final response.

Parameters
NameDescription
operationName string

The name of the long running operation

methodName string

The name of the method used to start the operation

Returns
TypeDescription
Google\ApiCore\OperationResponse