Skip to main content

resource_snapshot_jobs

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

Overview

Nameresource_snapshot_jobs
TypeResource
Idaws.partnercentral_selling.resource_snapshot_jobs

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
arnstringThe Amazon Resource Name (ARN) of the snapshot job. This globally unique identifier can be used for resource-specific operations across AWS services. (pattern: <code>arn:.*</code>)
catalogstringThe catalog in which the snapshot job was created. This will match the Catalog specified in the request. (pattern: <code>[a-zA-Z]+</code>)
created_atstring (date-time)The date and time when the snapshot job was created in ISO 8601 format (UTC). Example: "2023-05-01T20:37:46Z"
engagement_idstringThe identifier of the engagement associated with this snapshot job. This links the job to a specific engagement context. (pattern: <code>eng-[0-9a-z]{14}</code>)
idstringThe unique identifier of the snapshot job. This matches the ResourceSnapshotJobIdentifier provided in the request. (pattern: <code>job-[0-9a-z]{13}</code>)
last_failurestringIf the job has encountered any failures, this field contains the error message from the most recent failure. This can be useful for troubleshooting issues with the job.
last_successful_execution_datestring (date-time)The date and time of the last successful execution of the job, in ISO 8601 format (UTC). Example: "2023-05-01T20:37:46Z"
resource_arnstringThe Amazon Resource Name (ARN) of the resource being snapshotted. This provides a globally unique identifier for the resource across AWS. (pattern: <code>arn:.*</code>)
resource_idstringThe identifier of the specific resource being snapshotted. The format might vary depending on the ResourceType. (pattern: <code>O[0-9]{1,19}</code>)
resource_snapshot_template_namestringThe name of the template used for creating the snapshot. This is the same as the template name. It defines the structure and content of the snapshot. (pattern: <code>[a-zA-Z0-9]{3,80}</code>)
resource_typestringThe type of resource being snapshotted. This would have "Opportunity" as a value as it is dependent on the supported resource type. (Opportunity)
statusstringThe current status of the snapshot job. Valid values: STOPPED: The job is not currently running. RUNNING: The job is actively executing. (Running, Stopped)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_resource_snapshot_jobselectregionUse this action to retrieves information about a specific resource snapshot job.
list_resource_snapshot_jobsselectregionLists resource snapshot jobs owned by the customer. This operation supports various filtering scenarios, including listing all jobs owned by the caller, jobs for a specific engagement, jobs with a specific status, or any combination of these filters.
create_resource_snapshot_jobinsertregion, ClientToken, EngagementIdentifier, ResourceType, ResourceIdentifier, ResourceSnapshotTemplateIdentifierUse this action to create a job to generate a snapshot of the specified resource within an engagement. It initiates an asynchronous process to create a resource snapshot. The job creates a new snapshot only if the resource state has changed, adhering to the same access control and immutability rules as direct snapshot creation.
delete_resource_snapshot_jobdeleteregionUse this action to deletes a previously created resource snapshot job. The job must be in a stopped state before it can be deleted.

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 retrieves information about a specific resource snapshot job.

SELECT
arn,
catalog,
created_at,
engagement_id,
id,
last_failure,
last_successful_execution_date,
resource_arn,
resource_id,
resource_snapshot_template_name,
resource_type,
status
FROM aws.partnercentral_selling.resource_snapshot_jobs
WHERE region = '{{ region }}' -- required
;

INSERT examples

Use this action to create a job to generate a snapshot of the specified resource within an engagement. It initiates an asynchronous process to create a resource snapshot. The job creates a new snapshot only if the resource state has changed, adhering to the same access control and immutability rules as direct snapshot creation.

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

DELETE examples

Use this action to deletes a previously created resource snapshot job. The job must be in a stopped state before it can be deleted.

DELETE FROM aws.partnercentral_selling.resource_snapshot_jobs
WHERE region = '{{ region }}' --required
;