class Services extends Resource (View source)

The "services" collection of methods.

Typical usage is:

 $servicemanagementService = new Google\Service\ServiceManagement(...);
 $services = $servicemanagementService->services;

Methods

create(ManagedService $postBody, array $optParams = [])

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 (services.create)

delete(string $serviceName, array $optParams = [])

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 (services.delete)

generateConfigReport(GenerateConfigReportRequest $postBody, array $optParams = [])

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. (services.generateConfigReport)

get(string $serviceName, array $optParams = [])

Gets a managed service. Authentication is required unless the service is public. (services.get)

getConfig(string $serviceName, array $optParams = [])

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

getIamPolicy(string $resource, GetIamPolicyRequest $postBody, array $optParams = [])

Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set. (services.getIamPolicy)

listServices(array $optParams = [])

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

setIamPolicy(string $resource, SetIamPolicyRequest $postBody, array $optParams = [])

Sets the access control policy on the specified resource. Replaces any existing policy. Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors. (services.setIamPolicy)

testIamPermissions(string $resource, TestIamPermissionsRequest $postBody, array $optParams = [])

Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking.

undelete(string $serviceName, array $optParams = [])

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.

Details

Operation create(ManagedService $postBody, array $optParams = [])

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 (services.create)

Parameters

ManagedService $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

Operation delete(string $serviceName, array $optParams = [])

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 (services.delete)

Parameters

string $serviceName

Required. The name of the service. See the overview for naming requirements. For example: example.googleapis.com.

array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

GenerateConfigReportResponse generateConfigReport(GenerateConfigReportRequest $postBody, array $optParams = [])

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. (services.generateConfigReport)

Parameters

GenerateConfigReportRequest $postBody
array $optParams

Optional parameters.

Return Value

GenerateConfigReportResponse

Exceptions

Exception

ManagedService get(string $serviceName, array $optParams = [])

Gets a managed service. Authentication is required unless the service is public. (services.get)

Parameters

string $serviceName

Required. The name of the service. See the ServiceManager overview for naming requirements. For example: example.googleapis.com.

array $optParams

Optional parameters.

Return Value

ManagedService

Exceptions

Exception

Service getConfig(string $serviceName, array $optParams = [])

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

(services.getConfig)

Parameters

string $serviceName

Required. The name of the service. See the overview for naming requirements. For example: example.googleapis.com.

array $optParams

Optional parameters.

Return Value

Service

Exceptions

Exception

Policy getIamPolicy(string $resource, GetIamPolicyRequest $postBody, array $optParams = [])

Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set. (services.getIamPolicy)

Parameters

string $resource

REQUIRED: The resource for which the policy is being requested. See Resource names for the appropriate value for this field.

GetIamPolicyRequest $postBody
array $optParams

Optional parameters.

Return Value

Policy

Exceptions

Exception

ListServicesResponse listServices(array $optParams = [])

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

Parameters

array $optParams

Optional parameters.

Return Value

ListServicesResponse

Exceptions

Exception

Policy setIamPolicy(string $resource, SetIamPolicyRequest $postBody, array $optParams = [])

Sets the access control policy on the specified resource. Replaces any existing policy. Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors. (services.setIamPolicy)

Parameters

string $resource

REQUIRED: The resource for which the policy is being specified. See Resource names for the appropriate value for this field.

SetIamPolicyRequest $postBody
array $optParams

Optional parameters.

Return Value

Policy

Exceptions

Exception

TestIamPermissionsResponse testIamPermissions(string $resource, TestIamPermissionsRequest $postBody, array $optParams = [])

Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking.

This operation may "fail open" without warning. (services.testIamPermissions)

Parameters

string $resource

REQUIRED: The resource for which the policy detail is being requested. See Resource names for the appropriate value for this field.

TestIamPermissionsRequest $postBody
array $optParams

Optional parameters.

Return Value

TestIamPermissionsResponse

Exceptions

Exception

Operation undelete(string $serviceName, array $optParams = [])

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 (services.undelete)

Parameters

string $serviceName

Required. The name of the service. See the overview for naming requirements. For example: example.googleapis.com.

array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception