access_policies
Creates, updates, deletes, gets or lists an access_policies resource.
Overview
| Name | access_policies |
| Type | Resource |
| Id | aws.eks.access_policies |
Fields
The following fields are returned by SELECT queries:
- list_access_policies
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the access policy. |
arn | string | The ARN of the access policy. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_access_policies | select | region | maxResults, nextToken | Lists the available access policies. |
associate_access_policy | update | name, principal_arn, region, policyArn, accessScope | Associates an access policy and its scope to an access entry. For more information about associating access policies, see Associating and disassociating access policies to and from access entries in the Amazon EKS User Guide. | |
disassociate_access_policy | update | name, principal_arn, policy_arn, region | Disassociates an access policy from an access entry. |
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.
| Name | Datatype | Description |
|---|---|---|
name | string | The name of your cluster. |
policy_arn | string | The ARN of the policy to disassociate from the access entry. For a list of associated policies ARNs, use ListAssociatedAccessPolicies. |
principal_arn | string | The ARN of the IAM principal for the AccessEntry. |
region | string | AWS region (default: us-east-1) |
maxResults | integer | The maximum number of results, returned in paginated output. You receive maxResults in a single page, along with a nextToken response element. You can see the remaining results of the initial request by sending another request with the returned nextToken value. This value can be between 1 and 100. If you don't use this parameter, 100 results and a nextToken value, if applicable, are returned. |
nextToken | string | The nextToken value returned from a previous paginated request, where maxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the nextToken value. This value is null when there are no more results to return. This token should be treated as an opaque identifier that is used only to retrieve the next items in a list and not for other programmatic purposes. |
SELECT examples
- list_access_policies
Lists the available access policies.
SELECT
name,
arn
FROM aws.eks.access_policies
WHERE region = '{{ region }}' -- required
AND maxResults = '{{ maxResults }}'
AND nextToken = '{{ nextToken }}'
;
UPDATE examples
- associate_access_policy
- disassociate_access_policy
Associates an access policy and its scope to an access entry. For more information about associating access policies, see Associating and disassociating access policies to and from access entries in the Amazon EKS User Guide.
UPDATE aws.eks.access_policies
SET
policyArn = '{{ policyArn }}',
accessScope = '{{ accessScope }}'
WHERE
name = '{{ name }}' --required
AND principal_arn = '{{ principal_arn }}' --required
AND region = '{{ region }}' --required
AND policyArn = '{{ policyArn }}' --required
AND accessScope = '{{ accessScope }}' --required
RETURNING
associated_access_policy,
cluster_name,
principal_arn;
Disassociates an access policy from an access entry.
UPDATE aws.eks.access_policies
SET
-- No updatable properties
WHERE
name = '{{ name }}' --required
AND principal_arn = '{{ principal_arn }}' --required
AND policy_arn = '{{ policy_arn }}' --required
AND region = '{{ region }}' --required;