Skip to main content

resource_snapshots

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

Overview

Nameresource_snapshots
TypeResource
Idaws.partnercentral_selling.resource_snapshots

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
arnstringThe Amazon Resource Name (ARN) that uniquely identifies the resource snapshot. (pattern: <code>arn:.*</code>)
catalogstringThe catalog in which the snapshot was created. Matches the Catalog specified in the request. (pattern: <code>[a-zA-Z]+</code>)
created_atstring (date-time)The timestamp when the snapshot was created, in ISO 8601 format (e.g., "2023-06-01T14:30:00Z"). This allows for precise tracking of when the snapshot was taken.
created_bystringThe AWS account ID of the principal (user or role) who created the snapshot. This helps in tracking the origin of the snapshot. (pattern: <code>([0-9]{12}|\w{1,12})</code>)
engagement_idstringThe identifier of the engagement associated with this snapshot. Matches the EngagementIdentifier specified in the request. (pattern: <code>eng-[0-9a-z]{14}</code>)
payloadobjectRepresents the payload of a resource snapshot. This structure is designed to accommodate different types of resource snapshots, currently supporting opportunity summaries.
resource_idstringThe identifier of the specific resource that was snapshotted. Matches the ResourceIdentifier specified in the request. (pattern: <code>O[0-9]{1,19}</code>)
resource_snapshot_template_namestringThe name of the view used for this snapshot. This is the same as the template name. (pattern: <code>[a-zA-Z0-9]{3,80}</code>)
resource_typestringThe type of the resource that was snapshotted. Matches the ResourceType specified in the request. (Opportunity)
revisionintegerThe revision number of this snapshot. This is a positive integer that is sequential and unique within the context of a resource view.
target_member_accountsarrayTarget member accounts associated with the resource snapshot.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_resource_snapshotselectregionUse this action to retrieve a specific snapshot record.
list_resource_snapshotsselectregionRetrieves a list of resource view snapshots based on specified criteria. This operation supports various use cases, including: Fetching all snapshots associated with an engagement. Retrieving snapshots of a specific resource type within an engagement. Obtaining snapshots for a particular resource using a specified template. Accessing the latest snapshot of a resource within an engagement. Filtering snapshots by resource owner.
create_resource_snapshotinsertregion, EngagementIdentifier, ResourceType, ResourceIdentifier, ResourceSnapshotTemplateIdentifier, ClientTokenThis action allows you to create an immutable snapshot of a specific resource, such as an opportunity, within the context of an engagement. The snapshot captures a subset of the resource's data based on the schema defined by the provided template.
start_resource_snapshot_jobexecregion, ResourceSnapshotJobIdentifierStarts a resource snapshot job that has been previously created.
stop_resource_snapshot_jobexecregion, ResourceSnapshotJobIdentifierStops a resource snapshot job. The job must be started prior to being stopped.

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

Use this action to retrieve a specific snapshot record.

SELECT
arn,
catalog,
created_at,
created_by,
engagement_id,
payload,
resource_id,
resource_snapshot_template_name,
resource_type,
revision,
target_member_accounts
FROM aws.partnercentral_selling.resource_snapshots
WHERE region = '{{ region }}' -- required
;

INSERT examples

This action allows you to create an immutable snapshot of a specific resource, such as an opportunity, within the context of an engagement. The snapshot captures a subset of the resource's data based on the schema defined by the provided template.

INSERT INTO aws.partnercentral_selling.resource_snapshots (
Catalog,
EngagementIdentifier,
ResourceType,
ResourceIdentifier,
ResourceSnapshotTemplateIdentifier,
ClientToken,
region
)
SELECT
'{{ Catalog }}',
'{{ EngagementIdentifier }}' /* required */,
'{{ ResourceType }}' /* required */,
'{{ ResourceIdentifier }}' /* required */,
'{{ ResourceSnapshotTemplateIdentifier }}' /* required */,
'{{ ClientToken }}' /* required */,
'{{ region }}'
RETURNING
arn,
revision
;

Lifecycle Methods

Starts a resource snapshot job that has been previously created.

EXEC aws.partnercentral_selling.resource_snapshots.start_resource_snapshot_job
@region='{{ region }}' --required
@@json=
'{
"Catalog": "{{ Catalog }}",
"ResourceSnapshotJobIdentifier": "{{ ResourceSnapshotJobIdentifier }}"
}'
;