services
Creates, updates, deletes, gets or lists a services
resource.
Overview
Name | services |
Type | Resource |
Id | google.servicemanagement.services |
Fields
Name | Datatype | Description |
---|---|---|
producerProjectId | string | ID of the project that produces and owns this service. |
serviceName | string | The name of the service. See the overview for naming requirements. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | serviceName | Gets a managed service. Authentication is required unless the service is public. |
list | SELECT |
| Lists managed services. Returns all public services. For authenticated users, also returns all services the calling user has "servicemanagement.services.get" permission for. |
create | INSERT |
| 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 |
delete | DELETE | serviceName | 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 |
generate_config_report | EXEC |
| 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. |
undelete | EXEC | serviceName | 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 |
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.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.servicemanagement.services (
serviceName,
producerProjectId
)
SELECT
'{{ serviceName }}',
'{{ producerProjectId }}'
;
- name: your_resource_model_name
props:
- name: serviceName
value: string
- name: producerProjectId
value: string
DELETE
example
Deletes the specified services
resource.
/*+ delete */
DELETE FROM google.servicemanagement.services
WHERE serviceName = '{{ serviceName }}';