Attaching an IAM Policy to a Key
Use the post /v1/cckm/google/keys/{id}/policy
API to attach an IAM policy to a Google Cloud key with the given ID.
Syntax
Here, {id}
represents the resource ID of the Google Cloud key on the CipherTrust Manager.
Request Parameters
Parameter | Type | Description |
---|---|---|
AUTHTOKEN | string | Authorization token. |
bindings | array of json | Associates a list of members or principals with a role. Optionally, you can specify a condition that determines how and when the bindings are applied. Every binding must contain at least one principal. Refer to Binding Parameters for details. |
etag | string | A base64-encoded string. |
version | string | Specifies the format of the policy. Valid values are 0 , 1 , and 3 . Requests that specify an invalid value are rejected. |
Binding Parameters
Parameter | Type | Description |
---|---|---|
condition | JSON | Condition associated with the binding. Specify: • expression : Expression of the condition. It defines an attribute-based logic expression using a subset of the Common Expression Language (CEL).title : Title of the condition.description : Description of the condition.When specifying the condition , expression and title are mandatory. |
members | array of strings | Principals requesting access for a Google Cloud resource. |
role | string | Role assigned to the list of members or principals. |
Example Request
Example Response
The output shows that the IAM policy attached to the specified Google Cloud key has been updated.
Response Codes
Response Code | Description |
---|---|
2xx | Success |
4xx | Client errors |
5xx | Server errors |
Refer to HTTP status codes for details.