Skip to content

/AWS1/CL_PTS=>CREATERESOURCESNAPSHOT()

About CreateResourceSnapshot

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.

Method Signature

IMPORTING

Required arguments:

iv_catalog TYPE /AWS1/PTSCATALOGIDENTIFIER /AWS1/PTSCATALOGIDENTIFIER

Specifies the catalog where the snapshot is created. Valid values are AWS and Sandbox.

iv_engagementidentifier TYPE /AWS1/PTSENGAGEMENTIDENTIFIER /AWS1/PTSENGAGEMENTIDENTIFIER

The unique identifier of the engagement associated with this snapshot. This field links the snapshot to a specific engagement context.

iv_resourcetype TYPE /AWS1/PTSRESOURCETYPE /AWS1/PTSRESOURCETYPE

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.

iv_resourceidentifier TYPE /AWS1/PTSRESOURCEIDENTIFIER /AWS1/PTSRESOURCEIDENTIFIER

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.

iv_resourcesnaptemplateid TYPE /AWS1/PTSRESOURCETEMPLATENAME /AWS1/PTSRESOURCETEMPLATENAME

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.

iv_clienttoken TYPE /AWS1/PTSCLIENTTOKEN /AWS1/PTSCLIENTTOKEN

Specifies a unique, client-generated UUID to ensure that the request is handled exactly once. This token helps prevent duplicate snapshot creations.

RETURNING

oo_output TYPE REF TO /aws1/cl_ptscreateresrcsnaprsp /AWS1/CL_PTSCREATERESRCSNAPRSP

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~createresourcesnapshot(
  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_resourcearn = lo_result->get_arn( ).
  lv_resourcesnapshotrevisio = lo_result->get_revision( ).
ENDIF.