identity_policies
Creates, updates, deletes, gets or lists an identity_policies resource.
Overview
| Name | identity_policies |
| Type | Resource |
| Id | aws.ses.identity_policies |
Fields
The following fields are returned by SELECT queries:
- get_identity_policies
- list_identity_policies
| Name | Datatype | Description |
|---|---|---|
policies | string | A map of policy names to policies. |
| Name | Datatype | Description |
|---|---|---|
policy_name | string | A list of names of policies that apply to the specified identity. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_identity_policies | select | PolicyNames, region | Identity | Returns the requested sending authorization policies for the given identity (an email address or a domain). The policies are returned as a map of policy names to policy contents. You can retrieve a maximum of 20 policies at a time. This operation is for the identity owner only. If you have not verified the identity, it returns an error. Sending authorization is a feature that enables an identity owner to authorize other senders to use its identities. For information about using sending authorization, see the Amazon SES Developer Guide. You can execute this operation no more than once per second. |
list_identity_policies | select | region | Identity | Returns a list of sending authorization policies that are attached to the given identity (an email address or a domain). This operation returns only a list. To get the actual policy content, use GetIdentityPolicies. This operation is for the identity owner only. If you have not verified the identity, it returns an error. Sending authorization is a feature that enables an identity owner to authorize other senders to use its identities. For information about using sending authorization, see the Amazon SES Developer Guide. You can execute this operation no more than once per second. |
put_identity_policy | replace | PolicyName, Policy, region | Identity | Adds or updates a sending authorization policy for the specified identity (an email address or a domain). This operation is for the identity owner only. If you have not verified the identity, it returns an error. Sending authorization is a feature that enables an identity owner to authorize other senders to use its identities. For information about using sending authorization, see the Amazon SES Developer Guide. You can execute this operation no more than once per second. |
delete_identity_policy | delete | PolicyName, region | Identity | Deletes the specified sending authorization policy for the given identity (an email address or a domain). This operation returns successfully even if a policy with the specified name does not exist. This operation is for the identity owner only. If you have not verified the identity, it returns an error. Sending authorization is a feature that enables an identity owner to authorize other senders to use its identities. For information about using sending authorization, see the Amazon SES Developer Guide. You can execute this operation no more than once per second. |
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 |
|---|---|---|
Policy | string | The text of the policy in JSON format. The policy cannot exceed 4 KB. For information about the syntax of sending authorization policies, see the Amazon SES Developer Guide. |
PolicyName | string | The name of the policy to be deleted. |
PolicyNames | array | A list of the names of policies to be retrieved. You can retrieve a maximum of 20 policies at a time. If you do not know the names of the policies that are attached to the identity, you can use ListIdentityPolicies. |
region | string | AWS region (default: us-east-1) |
Identity | string | The identity that is associated with the policy to delete. You can specify the identity by using its name or by using its Amazon Resource Name (ARN). Examples: user@example.com, example.com, arn:aws:ses:us-east-1:123456789012:identity/example.com. To successfully call this operation, you must own the identity. |
SELECT examples
- get_identity_policies
- list_identity_policies
Returns the requested sending authorization policies for the given identity (an email address or a domain). The policies are returned as a map of policy names to policy contents. You can retrieve a maximum of 20 policies at a time. This operation is for the identity owner only. If you have not verified the identity, it returns an error. Sending authorization is a feature that enables an identity owner to authorize other senders to use its identities. For information about using sending authorization, see the Amazon SES Developer Guide. You can execute this operation no more than once per second.
SELECT
policies
FROM aws.ses.identity_policies
WHERE PolicyNames = '{{ PolicyNames }}' -- required
AND region = '{{ region }}' -- required
AND Identity = '{{ Identity }}'
;
Returns a list of sending authorization policies that are attached to the given identity (an email address or a domain). This operation returns only a list. To get the actual policy content, use GetIdentityPolicies. This operation is for the identity owner only. If you have not verified the identity, it returns an error. Sending authorization is a feature that enables an identity owner to authorize other senders to use its identities. For information about using sending authorization, see the Amazon SES Developer Guide. You can execute this operation no more than once per second.
SELECT
policy_name
FROM aws.ses.identity_policies
WHERE region = '{{ region }}' -- required
AND Identity = '{{ Identity }}'
;
REPLACE examples
- put_identity_policy
Adds or updates a sending authorization policy for the specified identity (an email address or a domain). This operation is for the identity owner only. If you have not verified the identity, it returns an error. Sending authorization is a feature that enables an identity owner to authorize other senders to use its identities. For information about using sending authorization, see the Amazon SES Developer Guide. You can execute this operation no more than once per second.
REPLACE aws.ses.identity_policies
SET
-- No updatable properties
WHERE
PolicyName = '{{ PolicyName }}' --required
AND Policy = '{{ Policy }}' --required
AND region = '{{ region }}' --required
AND Identity = '{{ Identity}}';
DELETE examples
- delete_identity_policy
Deletes the specified sending authorization policy for the given identity (an email address or a domain). This operation returns successfully even if a policy with the specified name does not exist. This operation is for the identity owner only. If you have not verified the identity, it returns an error. Sending authorization is a feature that enables an identity owner to authorize other senders to use its identities. For information about using sending authorization, see the Amazon SES Developer Guide. You can execute this operation no more than once per second.
DELETE FROM aws.ses.identity_policies
WHERE PolicyName = '{{ PolicyName }}' --required
AND region = '{{ region }}' --required
AND Identity = '{{ Identity }}'
;