Skip to main content

services

Creates, updates, deletes, gets or lists a services resource.

Overview

Nameservices
TypeResource
Idgoogle.servicemanagement.services

Fields

NameDatatypeDescription
producerProjectIdstringID of the project that produces and owns this service.
serviceNamestringThe name of the service. See the overview for naming requirements.

Methods

NameAccessible byRequired ParamsDescription
getSELECTserviceNameGets a managed service. Authentication is required unless the service is public.
listSELECTLists managed services. Returns all public services. For authenticated users, also returns all services the calling user has "servicemanagement.services.get" permission for.
createINSERTCreates 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
deleteDELETEserviceNameDeletes 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
generate_config_reportEXECGenerates 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.
undeleteEXECserviceNameRevives 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

SELECT examples

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

SELECT
producerProjectId,
serviceName
FROM google.servicemanagement.services
;

INSERT example

Use the following StackQL query and manifest file to create a new services resource.

/*+ create */
INSERT INTO google.servicemanagement.services (
serviceName,
producerProjectId
)
SELECT
'{{ serviceName }}',
'{{ producerProjectId }}'
;

DELETE example

Deletes the specified services resource.

/*+ delete */
DELETE FROM google.servicemanagement.services
WHERE serviceName = '{{ serviceName }}';