Skip to content

/AWS1/CL_PTS=>CREATERESOURCESNAPSHOTJOB()

About CreateResourceSnapshotJob

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.

Method Signature

IMPORTING

Required arguments:

iv_catalog TYPE /AWS1/PTSCATALOGIDENTIFIER /AWS1/PTSCATALOGIDENTIFIER

Specifies the catalog in which to create the snapshot job. Valid values are AWS and Sandbox.

iv_clienttoken TYPE /AWS1/PTSCLIENTTOKEN /AWS1/PTSCLIENTTOKEN

A client-generated UUID used for idempotency check. The token helps prevent duplicate job creations.

iv_engagementidentifier TYPE /AWS1/PTSENGAGEMENTIDENTIFIER /AWS1/PTSENGAGEMENTIDENTIFIER

Specifies the identifier of the engagement associated with the resource to be snapshotted.

iv_resourcetype TYPE /AWS1/PTSRESOURCETYPE /AWS1/PTSRESOURCETYPE

The type of resource for which the snapshot job is being created. Must be one of the supported resource types i.e. Opportunity

iv_resourceidentifier TYPE /AWS1/PTSRESOURCEIDENTIFIER /AWS1/PTSRESOURCEIDENTIFIER

Specifies the identifier of the specific resource to be snapshotted. The format depends on the ResourceType.

iv_resourcesnaptemplateid TYPE /AWS1/PTSRESOURCETEMPLATENAME /AWS1/PTSRESOURCETEMPLATENAME

Specifies the name of the template that defines the schema for the snapshot.

Optional arguments:

it_tags TYPE /AWS1/CL_PTSTAG=>TT_TAGLIST TT_TAGLIST

A map of the key-value pairs of the tag or tags to assign.

RETURNING

oo_output TYPE REF TO /aws1/cl_ptscreresrcsnapjobrsp /AWS1/CL_PTSCRERESRCSNAPJOBRSP

Domain /AWS1/RT_ACCOUNT_ID
Primitive Type NUMC

Examples

Syntax Example

This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.

DATA(lo_result) = lo_client->/aws1/if_pts~createresourcesnapshotjob(
  it_tags = VALUE /aws1/cl_ptstag=>tt_taglist(
    (
      new /aws1/cl_ptstag(
        iv_key = |string|
        iv_value = |string|
      )
    )
  )
  iv_catalog = |string|
  iv_clienttoken = |string|
  iv_engagementidentifier = |string|
  iv_resourceidentifier = |string|
  iv_resourcesnaptemplateid = |string|
  iv_resourcetype = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv_resourcesnapshotjobiden = lo_result->get_id( ).
  lv_resourcesnapshotjobarn = lo_result->get_arn( ).
ENDIF.