policy_store_alias
Creates, updates, deletes, gets or lists a policy_store_alias resource.
Overview
| Name | policy_store_alias |
| Type | Resource |
| Id | aws.verifiedpermissions.policy_store_alias |
Fields
The following fields are returned by SELECT queries:
- get_policy_store_alias
| Name | Datatype | Description |
|---|---|---|
alias_arn | string | The Amazon Resource Name (ARN) of the policy store alias. (pattern: <code>arn:[^:]:[^:]:[^:]:[^:]:.*</code>) |
alias_name | string | The name of the policy store alias. (pattern: <code>[a-zA-Z0-9-/_]*</code>) |
created_at | string (date-time) | The date and time the policy store alias was created. |
policy_store_id | string | The ID of the policy store associated with the alias. (pattern: <code>[a-zA-Z0-9-/_]*</code>) |
state | string | The state of the policy store alias. Policy Store Aliases in the Active state can be used normally. When a policy store alias is deleted, it enters the PendingDeletion state. Policy Store Aliases in the PendingDeletion cannot be used, and creating a policy store alias with the same alias name will fail. (Active, PendingDeletion) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_policy_store_alias | select | region | Retrieves details about the specified policy store alias. | |
create_policy_store_alias | insert | region, aliasName, policyStoreId | Creates a policy store alias for the specified policy store. A policy store alias is an alternative identifier that you can use to reference a policy store in API operations. This operation is idempotent. If multiple CreatePolicyStoreAlias requests are made where the aliasName and policyStoreId fields are the same between the requests, subsequent requests will be ignored. For each duplicate CreatePolicyStoreAlias request, a Success response will be returned and a new policy store alias will not be created. Verified Permissions is eventually consistent . It can take a few seconds for a new or changed element to propagate through the service and be visible in the results of other Verified Permissions operations. | |
delete_policy_store_alias | delete | region | Deletes the specified policy store alias. This operation is idempotent. If you specify a policy store alias that does not exist, the request response will still return a successful HTTP 200 status code. By default, when a policy store alias is deleted, it enters the PendingDeletion state. When a policy store alias is in the PendingDeletion state, new policy store aliases cannot be created with the same name. If the policy store alias is used in an API that has a policyStoreId field, the operation will fail with a ResourceNotFound exception. To immediately delete a policy store alias and bypass the PendingDeletion state, set the deletionMode parameter to HardDelete. Verified Permissions is eventually consistent. If you hard delete a policy store alias and then immediately recreate it to be associated with a different policy store, requests that reference this alias may continue to be evaluated against the previously associated policy store for a short period of time. |
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 |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_policy_store_alias
Retrieves details about the specified policy store alias.
SELECT
alias_arn,
alias_name,
created_at,
policy_store_id,
state
FROM aws.verifiedpermissions.policy_store_alias
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_policy_store_alias
- Manifest
Creates a policy store alias for the specified policy store. A policy store alias is an alternative identifier that you can use to reference a policy store in API operations. This operation is idempotent. If multiple CreatePolicyStoreAlias requests are made where the aliasName and policyStoreId fields are the same between the requests, subsequent requests will be ignored. For each duplicate CreatePolicyStoreAlias request, a Success response will be returned and a new policy store alias will not be created. Verified Permissions is eventually consistent . It can take a few seconds for a new or changed element to propagate through the service and be visible in the results of other Verified Permissions operations.
INSERT INTO aws.verifiedpermissions.policy_store_alias (
aliasName,
policyStoreId,
region
)
SELECT
'{{ aliasName }}' /* required */,
'{{ policyStoreId }}' /* required */,
'{{ region }}'
RETURNING
alias_arn,
alias_name,
created_at,
policy_store_id
;
# Description fields are for documentation purposes
- name: policy_store_alias
props:
- name: region
value: "{{ region }}"
description: Required parameter for the policy_store_alias resource.
- name: aliasName
value: "{{ aliasName }}"
description: |
Specifies the name of the policy store alias to create. The name must be unique within your Amazon Web Services account and Amazon Web Services Region. The alias name must always be prefixed with policy-store-alias/.
- name: policyStoreId
value: "{{ policyStoreId }}"
description: |
Specifies the ID of the policy store to associate with the alias. The associated policy store must be specified using its ID. The alias name cannot be used.
DELETE examples
- delete_policy_store_alias
Deletes the specified policy store alias. This operation is idempotent. If you specify a policy store alias that does not exist, the request response will still return a successful HTTP 200 status code. By default, when a policy store alias is deleted, it enters the PendingDeletion state. When a policy store alias is in the PendingDeletion state, new policy store aliases cannot be created with the same name. If the policy store alias is used in an API that has a policyStoreId field, the operation will fail with a ResourceNotFound exception. To immediately delete a policy store alias and bypass the PendingDeletion state, set the deletionMode parameter to HardDelete. Verified Permissions is eventually consistent. If you hard delete a policy store alias and then immediately recreate it to be associated with a different policy store, requests that reference this alias may continue to be evaluated against the previously associated policy store for a short period of time.
DELETE FROM aws.verifiedpermissions.policy_store_alias
WHERE region = '{{ region }}' --required
;