hmac_keys
Creates, updates, deletes, gets or lists a hmac_keys
resource.
Overview
Name | hmac_keys |
Type | Resource |
Id | google.storage.hmac_keys |
Fields
Name | Datatype | Description |
---|---|---|
id | string | The ID of the HMAC key, including the Project ID and the Access ID. |
accessId | string | The ID of the HMAC Key. |
etag | string | HTTP 1.1 Entity tag for the HMAC key. |
kind | string | The kind of item this is. For HMAC Key metadata, this is always storage#hmacKeyMetadata. |
projectId | string | Project ID owning the service account to which the key authenticates. |
selfLink | string | The link to this resource. |
serviceAccountEmail | string | The email address of the key's associated service account. |
state | string | The state of the key. Can be one of ACTIVE, INACTIVE, or DELETED. |
timeCreated | string | The creation time of the HMAC key in RFC 3339 format. |
updated | string | The last modification time of the HMAC key metadata in RFC 3339 format. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | accessId, projectId | Retrieves an HMAC key's metadata |
list | SELECT | projectId | Retrieves a list of HMAC keys matching the criteria. |
create | INSERT | projectId, serviceAccountEmail | Creates a new HMAC key for the specified service account. |
delete | DELETE | accessId, projectId | Deletes an HMAC key. |
update | REPLACE | accessId, projectId | Updates the state of an HMAC key. See the HMAC Key resource descriptor for valid states. |
SELECT
examples
Retrieves a list of HMAC keys matching the criteria.
SELECT
id,
accessId,
etag,
kind,
projectId,
selfLink,
serviceAccountEmail,
state,
timeCreated,
updated
FROM google.storage.hmac_keys
WHERE projectId = '{{ projectId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new hmac_keys
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.storage.hmac_keys (
projectId,
serviceAccountEmail
)
SELECT
'{{ projectId }}',
'{{ serviceAccountEmail }}'
;
- name: your_resource_model_name
props: []
REPLACE
example
Replaces all fields in the specified hmac_keys
resource.
/*+ update */
REPLACE google.storage.hmac_keys
SET
accessId = '{{ accessId }}',
etag = '{{ etag }}',
projectId = '{{ projectId }}',
serviceAccountEmail = '{{ serviceAccountEmail }}',
state = '{{ state }}',
timeCreated = '{{ timeCreated }}',
updated = '{{ updated }}'
WHERE
accessId = '{{ accessId }}'
AND projectId = '{{ projectId }}';
DELETE
example
Deletes the specified hmac_keys
resource.
/*+ delete */
DELETE FROM google.storage.hmac_keys
WHERE accessId = '{{ accessId }}'
AND projectId = '{{ projectId }}';