resource_snapshot_jobs
Creates, updates, deletes, gets or lists a resource_snapshot_jobs resource.
Overview
| Name | resource_snapshot_jobs |
| Type | Resource |
| Id | aws.partnercentral_selling.resource_snapshot_jobs |
Fields
The following fields are returned by SELECT queries:
- get_resource_snapshot_job
- list_resource_snapshot_jobs
| Name | Datatype | Description |
|---|---|---|
arn | string | The 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>) |
catalog | string | The catalog in which the snapshot job was created. This will match the Catalog specified in the request. (pattern: <code>[a-zA-Z]+</code>) |
created_at | string (date-time) | The date and time when the snapshot job was created in ISO 8601 format (UTC). Example: "2023-05-01T20:37:46Z" |
engagement_id | string | The 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>) |
id | string | The unique identifier of the snapshot job. This matches the ResourceSnapshotJobIdentifier provided in the request. (pattern: <code>job-[0-9a-z]{13}</code>) |
last_failure | string | If 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_date | string (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_arn | string | The 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_id | string | The 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_name | string | The 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_type | string | The type of resource being snapshotted. This would have "Opportunity" as a value as it is dependent on the supported resource type. (Opportunity) |
status | string | The current status of the snapshot job. Valid values: STOPPED: The job is not currently running. RUNNING: The job is actively executing. (Running, Stopped) |
| Name | Datatype | Description |
|---|---|---|
arn | string | The Amazon Resource Name (ARN) for the resource snapshot job. (pattern: <code>arn:.*</code>) |
engagement_id | string | The unique identifier of the Engagement. (pattern: <code>eng-[0-9a-z]{14}</code>) |
id | string | The unique identifier for the resource snapshot job within the AWS Partner Central system. This ID is used for direct references to the job within the service. (pattern: <code>job-[0-9a-z]{13}</code>) |
status | string | The 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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_resource_snapshot_job | select | region | Use this action to retrieves information about a specific resource snapshot job. | |
list_resource_snapshot_jobs | select | region | Lists 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_job | insert | region, ClientToken, EngagementIdentifier, ResourceType, ResourceIdentifier, ResourceSnapshotTemplateIdentifier | 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. | |
delete_resource_snapshot_job | delete | region | Use 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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_resource_snapshot_job
- list_resource_snapshot_jobs
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
;
Lists 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.
SELECT
arn,
engagement_id,
id,
status
FROM aws.partnercentral_selling.resource_snapshot_jobs
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_resource_snapshot_job
- Manifest
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
;
# Description fields are for documentation purposes
- name: resource_snapshot_jobs
props:
- name: region
value: "{{ region }}"
description: Required parameter for the resource_snapshot_jobs resource.
- name: Catalog
value: "{{ Catalog }}"
description: |
Specifies the catalog in which to create the snapshot job. Valid values are AWS and Sandbox.
- name: ClientToken
value: "{{ ClientToken }}"
description: |
A client-generated UUID used for idempotency check. The token helps prevent duplicate job creations.
- name: EngagementIdentifier
value: "{{ EngagementIdentifier }}"
description: |
Specifies the identifier of the engagement associated with the resource to be snapshotted.
- name: ResourceType
value: "{{ ResourceType }}"
description: |
The type of resource for which the snapshot job is being created. Must be one of the supported resource types i.e. Opportunity
valid_values: ['Opportunity']
- name: ResourceIdentifier
value: "{{ ResourceIdentifier }}"
description: |
Specifies the identifier of the specific resource to be snapshotted. The format depends on the ResourceType.
- name: ResourceSnapshotTemplateIdentifier
value: "{{ ResourceSnapshotTemplateIdentifier }}"
description: |
Specifies the name of the template that defines the schema for the snapshot.
- name: Tags
description: |
A map of the key-value pairs of the tag or tags to assign.
value:
- Key: "{{ Key }}"
Value: "{{ Value }}"
DELETE examples
- delete_resource_snapshot_job
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
;