resource_snapshots
Creates, updates, deletes, gets or lists a resource_snapshots resource.
Overview
| Name | resource_snapshots |
| Type | Resource |
| Id | aws.partnercentral_selling.resource_snapshots |
Fields
The following fields are returned by SELECT queries:
- get_resource_snapshot
- list_resource_snapshots
| Name | Datatype | Description |
|---|---|---|
arn | string | The Amazon Resource Name (ARN) that uniquely identifies the resource snapshot. (pattern: <code>arn:.*</code>) |
catalog | string | The catalog in which the snapshot was created. Matches the Catalog specified in the request. (pattern: <code>[a-zA-Z]+</code>) |
created_at | string (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_by | string | The 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_id | string | The identifier of the engagement associated with this snapshot. Matches the EngagementIdentifier specified in the request. (pattern: <code>eng-[0-9a-z]{14}</code>) |
payload | object | Represents the payload of a resource snapshot. This structure is designed to accommodate different types of resource snapshots, currently supporting opportunity summaries. |
resource_id | string | The 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_name | string | The 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_type | string | The type of the resource that was snapshotted. Matches the ResourceType specified in the request. (Opportunity) |
revision | integer | The revision number of this snapshot. This is a positive integer that is sequential and unique within the context of a resource view. |
target_member_accounts | array | Target member accounts associated with the resource snapshot. |
| Name | Datatype | Description |
|---|---|---|
arn | string | The Amazon Resource Name (ARN) of the snapshot. This globally unique identifier can be used for cross-service references and in IAM policies. (pattern: <code>arn:.*</code>) |
created_by | string | The AWS account ID of the entity that owns the resource from which the snapshot was created. (pattern: <code>([0-9]{12}|\w{1,12})</code>) |
resource_id | string | The identifier of the specific resource snapshotted. The format might vary depending on the ResourceType. (pattern: <code>O[0-9]{1,19}</code>) |
resource_snapshot_template_name | string | The name of the template used to create the snapshot. (pattern: <code>[a-zA-Z0-9]{3,80}</code>) |
resource_type | string | The type of resource snapshotted. (Opportunity) |
revision | integer | The revision number of the snapshot. This integer value is incremented each time the snapshot is updated, allowing for version tracking of the resource snapshot. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_resource_snapshot | select | region | Use this action to retrieve a specific snapshot record. | |
list_resource_snapshots | select | region | Retrieves 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_snapshot | insert | region, EngagementIdentifier, ResourceType, ResourceIdentifier, ResourceSnapshotTemplateIdentifier, ClientToken | 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. | |
start_resource_snapshot_job | exec | region, ResourceSnapshotJobIdentifier | Starts a resource snapshot job that has been previously created. | |
stop_resource_snapshot_job | exec | region, ResourceSnapshotJobIdentifier | Stops 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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_resource_snapshot
- list_resource_snapshots
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
;
Retrieves 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.
SELECT
arn,
created_by,
resource_id,
resource_snapshot_template_name,
resource_type,
revision
FROM aws.partnercentral_selling.resource_snapshots
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_resource_snapshot
- Manifest
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
;
# Description fields are for documentation purposes
- name: resource_snapshots
props:
- name: region
value: "{{ region }}"
description: Required parameter for the resource_snapshots resource.
- name: Catalog
value: "{{ Catalog }}"
description: |
Specifies the catalog where the snapshot is created. Valid values are AWS and Sandbox.
- name: EngagementIdentifier
value: "{{ EngagementIdentifier }}"
description: |
The unique identifier of the engagement associated with this snapshot. This field links the snapshot to a specific engagement context.
- name: ResourceType
value: "{{ ResourceType }}"
description: |
Specifies the type of resource for which the snapshot is being created. This field determines the structure and content of the snapshot. Must be one of the supported resource types, such as: Opportunity.
valid_values: ['Opportunity']
- name: ResourceIdentifier
value: "{{ ResourceIdentifier }}"
description: |
The unique identifier of the specific resource to be snapshotted. The format and constraints of this identifier depend on the ResourceType specified. For example: For Opportunity type, it will be an opportunity ID.
- name: ResourceSnapshotTemplateIdentifier
value: "{{ ResourceSnapshotTemplateIdentifier }}"
description: |
The name of the template that defines the schema for the snapshot. This template determines which subset of the resource data will be included in the snapshot. Must correspond to an existing and valid template for the specified ResourceType.
- name: ClientToken
value: "{{ ClientToken }}"
description: |
Specifies a unique, client-generated UUID to ensure that the request is handled exactly once. This token helps prevent duplicate snapshot creations.
Lifecycle Methods
- start_resource_snapshot_job
- stop_resource_snapshot_job
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 }}"
}'
;
Stops a resource snapshot job. The job must be started prior to being stopped.
EXEC aws.partnercentral_selling.resource_snapshots.stop_resource_snapshot_job
@region='{{ region }}' --required
@@json=
'{
"Catalog": "{{ Catalog }}",
"ResourceSnapshotJobIdentifier": "{{ ResourceSnapshotJobIdentifier }}"
}'
;