services
Creates, updates, deletes, gets or lists a services
resource.
Overview
Name | services |
Type | Resource |
Id | google.apphub.services |
Fields
Name | Datatype | Description |
---|---|---|
name | string | Identifier. The resource name of a Service. Format: "projects/{host-project-id}/locations/{location}/applications/{application-id}/services/{service-id}" |
description | string | Optional. User-defined description of a Service. Can have a maximum length of 2048 characters. |
attributes | object | Consumer provided attributes. |
createTime | string | Output only. Create time. |
discoveredService | string | Required. Immutable. The resource name of the original discovered service. |
displayName | string | Optional. User-defined name for the Service. Can have a maximum length of 63 characters. |
serviceProperties | object | Properties of an underlying cloud resource that can comprise a Service. |
serviceReference | object | Reference to an underlying networking resource that can comprise a Service. |
state | string | Output only. Service state. |
uid | string | Output only. A universally unique identifier (UUID) for the Service in the UUID4 format. |
updateTime | string | Output only. Update time. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | applicationsId, locationsId, projectsId, servicesId | Gets a Service in an Application. |
list | SELECT | applicationsId, locationsId, projectsId | Lists Services in an Application. |
create | INSERT | applicationsId, locationsId, projectsId | Creates a Service in an Application. |
delete | DELETE | applicationsId, locationsId, projectsId, servicesId | Deletes a Service from an Application. |
patch | UPDATE | applicationsId, locationsId, projectsId, servicesId | Updates a Service in an Application. |
SELECT
examples
Lists Services in an Application.
SELECT
name,
description,
attributes,
createTime,
discoveredService,
displayName,
serviceProperties,
serviceReference,
state,
uid,
updateTime
FROM google.apphub.services
WHERE applicationsId = '{{ applicationsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new services
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.apphub.services (
applicationsId,
locationsId,
projectsId,
name,
displayName,
description,
attributes,
discoveredService
)
SELECT
'{{ applicationsId }}',
'{{ locationsId }}',
'{{ projectsId }}',
'{{ name }}',
'{{ displayName }}',
'{{ description }}',
'{{ attributes }}',
'{{ discoveredService }}'
;
- name: your_resource_model_name
props:
- name: name
value: string
- name: displayName
value: string
- name: description
value: string
- name: serviceReference
value:
- name: uri
value: string
- name: serviceProperties
value:
- name: gcpProject
value: string
- name: location
value: string
- name: zone
value: string
- name: attributes
value:
- name: criticality
value:
- name: type
value: string
- name: environment
value:
- name: type
value: string
- name: developerOwners
value:
- - name: displayName
value: string
- name: email
value: string
- name: operatorOwners
value:
- - name: displayName
value: string
- name: email
value: string
- name: businessOwners
value:
- - name: displayName
value: string
- name: email
value: string
- name: discoveredService
value: string
- name: createTime
value: string
- name: updateTime
value: string
- name: uid
value: string
- name: state
value: string
UPDATE
example
Updates a services
resource.
/*+ update */
UPDATE google.apphub.services
SET
name = '{{ name }}',
displayName = '{{ displayName }}',
description = '{{ description }}',
attributes = '{{ attributes }}',
discoveredService = '{{ discoveredService }}'
WHERE
applicationsId = '{{ applicationsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND servicesId = '{{ servicesId }}';
DELETE
example
Deletes the specified services
resource.
/*+ delete */
DELETE FROM google.apphub.services
WHERE applicationsId = '{{ applicationsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND servicesId = '{{ servicesId }}';