Skip to main content

resource_policies

Creates, updates, deletes, gets or lists a resource_policies resource.

Overview

Nameresource_policies
TypeResource
Idaws.pinpoint_sms_voice_v2.resource_policies

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
created_timestampstring (date-time)The time when the resource-based policy was created, in UNIX epoch time format.
policystringThe JSON formatted string that contains the resource-based policy attached to the End User Messaging SMS resource.
resource_arnstringThe Amazon Resource Name (ARN) of the End User Messaging SMS resource attached to the resource-based policy. (pattern: <code>arn:[A-Za-z0-9_:/-]+</code>)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_resource_policyselectregionRetrieves the JSON text of the resource-based policy document attached to the End User Messaging SMS resource. A shared resource can be a Pool, Opt-out list, Sender Id, or Phone number.
put_resource_policyreplaceregion, ResourceArnAttaches a resource-based policy to a End User Messaging SMS resource(phone number, sender Id, phone poll, or opt-out list) that is used for sharing the resource. A shared resource can be a Pool, Opt-out list, Sender Id, or Phone number. For more information about resource-based policies, see Working with shared resources in the End User Messaging SMS User Guide.
delete_resource_policydeleteregionDeletes the resource-based policy document attached to the End User Messaging SMS resource. A shared resource can be a Pool, Opt-out list, Sender Id, or Phone number.

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.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Retrieves the JSON text of the resource-based policy document attached to the End User Messaging SMS resource. A shared resource can be a Pool, Opt-out list, Sender Id, or Phone number.

SELECT
created_timestamp,
policy,
resource_arn
FROM aws.pinpoint_sms_voice_v2.resource_policies
WHERE region = '{{ region }}' -- required
;

REPLACE examples

Attaches a resource-based policy to a End User Messaging SMS resource(phone number, sender Id, phone poll, or opt-out list) that is used for sharing the resource. A shared resource can be a Pool, Opt-out list, Sender Id, or Phone number. For more information about resource-based policies, see Working with shared resources in the End User Messaging SMS User Guide.

REPLACE aws.pinpoint_sms_voice_v2.resource_policies
SET
ResourceArn = '{{ ResourceArn }}',
Policy = '{{ Policy }}'
WHERE
region = '{{ region }}' --required
AND ResourceArn = '{{ ResourceArn }}' --required
RETURNING
created_timestamp,
policy,
resource_arn;

DELETE examples

Deletes the resource-based policy document attached to the End User Messaging SMS resource. A shared resource can be a Pool, Opt-out list, Sender Id, or Phone number.

DELETE FROM aws.pinpoint_sms_voice_v2.resource_policies
WHERE region = '{{ region }}' --required
;