Skip to main content

instances

Creates, updates, deletes, gets or lists an instances resource.

Overview

Nameinstances
TypeResource
Idgoogle.securesourcemanager.instances

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringOptional. A unique identifier for an instance. The name should be of the format: projects/{project_number}/locations/{location_id}/instances/{instance_id} project_number: Maps to a unique int64 id assigned to each project. location_id: Refers to the region where the instance will be deployed. Since Secure Source Manager is a regional service, it must be one of the valid GCP regions. instance_id: User provided name for the instance, must be unique for a project_number and location_id combination.
createTimestring (google-datetime)Output only. Create timestamp.
hostConfigobjectOutput only. A list of hostnames for this instance. (id: HostConfig)
kmsKeystringOptional. Immutable. Customer-managed encryption key name, in the format projects//locations//keyRings//cryptoKeys/.
labelsobjectOptional. Labels as key value pairs.
privateConfigobjectOptional. Private settings for private instance. (id: PrivateConfig)
statestringOutput only. Current state of the instance.
stateNotestringOutput only. An optional field providing information about the current instance state.
updateTimestring (google-datetime)Output only. Update timestamp.
workforceIdentityFederationConfigobjectOptional. Configuration for Workforce Identity Federation to support third party identity provider. If unset, defaults to the Google OIDC IdP. (id: WorkforceIdentityFederationConfig)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, instancesIdGets details of a single instance.
listselectprojectsId, locationsIdpageSize, pageToken, filter, orderByLists Instances in a given project and location.
createinsertprojectsId, locationsIdinstanceId, requestIdCreates a new instance in a given project and location.
deletedeleteprojectsId, locationsId, instancesIdrequestIdDeletes a single instance.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
instancesIdstring
locationsIdstring
projectsIdstring
filterstring
instanceIdstring
orderBystring
pageSizeinteger (int32)
pageTokenstring
requestIdstring

SELECT examples

Gets details of a single instance.

SELECT
name,
createTime,
hostConfig,
kmsKey,
labels,
privateConfig,
state,
stateNote,
updateTime,
workforceIdentityFederationConfig
FROM google.securesourcemanager.instances
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND instancesId = '{{ instancesId }}' -- required;

INSERT examples

Creates a new instance in a given project and location.

INSERT INTO google.securesourcemanager.instances (
data__name,
data__labels,
data__privateConfig,
data__kmsKey,
data__workforceIdentityFederationConfig,
projectsId,
locationsId,
instanceId,
requestId
)
SELECT
'{{ name }}',
'{{ labels }}',
'{{ privateConfig }}',
'{{ kmsKey }}',
'{{ workforceIdentityFederationConfig }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ instanceId }}',
'{{ requestId }}'
RETURNING
name,
done,
error,
metadata,
response
;

DELETE examples

Deletes a single instance.

DELETE FROM google.securesourcemanager.instances
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND instancesId = '{{ instancesId }}' --required
AND requestId = '{{ requestId }}';