Skip to content

/AWS1/IF_CON=>CREATESYNCCONFIGURATION()

About CreateSyncConfiguration

Creates a sync configuration which allows Amazon Web Services to sync content from a Git repository to update a specified Amazon Web Services resource. Parameters for the sync configuration are determined by the sync type.

Method Signature

METHODS /AWS1/IF_CON~CREATESYNCCONFIGURATION
  IMPORTING
    !IV_BRANCH TYPE /AWS1/CONBRANCHNAME OPTIONAL
    !IV_CONFIGFILE TYPE /AWS1/CONDEPLOYMENTFILEPATH OPTIONAL
    !IV_REPOSITORYLINKID TYPE /AWS1/CONREPOSITORYLINKID OPTIONAL
    !IV_RESOURCENAME TYPE /AWS1/CONRESOURCENAME OPTIONAL
    !IV_ROLEARN TYPE /AWS1/CONIAMROLEARN OPTIONAL
    !IV_SYNCTYPE TYPE /AWS1/CONSYNCCONFIGURATIONTYPE OPTIONAL
    !IV_PUBLISHDEPLOYMENTSTATUS TYPE /AWS1/CONPUBDEPLOYMENTSTATUS OPTIONAL
    !IV_TRIGGERRESOURCEUPDATEON TYPE /AWS1/CONTRIGGERRESRCUPDATEON OPTIONAL
    !IV_PULLREQUESTCOMMENT TYPE /AWS1/CONPULLREQUESTCOMMENT OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_concreatesyncconfout
  RAISING
    /AWS1/CX_CONACCESSDENIEDEX
    /AWS1/CX_CONCONCURRENTMODEX
    /AWS1/CX_CONINTERNALSERVEREX
    /AWS1/CX_CONINVALIDINPUTEX
    /AWS1/CX_CONLIMITEXCEEDEDEX
    /AWS1/CX_CONRESRCALRDYEXISTSEX
    /AWS1/CX_CONTHROTTLINGEX
    /AWS1/CX_CONCLIENTEXC
    /AWS1/CX_CONSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_branch TYPE /AWS1/CONBRANCHNAME /AWS1/CONBRANCHNAME

The branch in the repository from which changes will be synced.

iv_configfile TYPE /AWS1/CONDEPLOYMENTFILEPATH /AWS1/CONDEPLOYMENTFILEPATH

The file name of the configuration file that manages syncing between the connection and the repository. This configuration file is stored in the repository.

iv_repositorylinkid TYPE /AWS1/CONREPOSITORYLINKID /AWS1/CONREPOSITORYLINKID

The ID of the repository link created for the connection. A repository link allows Git sync to monitor and sync changes to files in a specified Git repository.

iv_resourcename TYPE /AWS1/CONRESOURCENAME /AWS1/CONRESOURCENAME

The name of the Amazon Web Services resource (for example, a CloudFormation stack in the case of CFN_STACK_SYNC) that will be synchronized from the linked repository.

iv_rolearn TYPE /AWS1/CONIAMROLEARN /AWS1/CONIAMROLEARN

The ARN of the IAM role that grants permission for Amazon Web Services to use Git sync to update a given Amazon Web Services resource on your behalf.

iv_synctype TYPE /AWS1/CONSYNCCONFIGURATIONTYPE /AWS1/CONSYNCCONFIGURATIONTYPE

The type of sync configuration.

Optional arguments:

iv_publishdeploymentstatus TYPE /AWS1/CONPUBDEPLOYMENTSTATUS /AWS1/CONPUBDEPLOYMENTSTATUS

Whether to enable or disable publishing of deployment status to source providers.

iv_triggerresourceupdateon TYPE /AWS1/CONTRIGGERRESRCUPDATEON /AWS1/CONTRIGGERRESRCUPDATEON

When to trigger Git sync to begin the stack update.

iv_pullrequestcomment TYPE /AWS1/CONPULLREQUESTCOMMENT /AWS1/CONPULLREQUESTCOMMENT

A toggle that specifies whether to enable or disable pull request comments for the sync configuration to be created.

RETURNING

oo_output TYPE REF TO /aws1/cl_concreatesyncconfout /AWS1/CL_CONCREATESYNCCONFOUT

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->createsyncconfiguration(
  iv_branch = |string|
  iv_configfile = |string|
  iv_publishdeploymentstatus = |string|
  iv_pullrequestcomment = |string|
  iv_repositorylinkid = |string|
  iv_resourcename = |string|
  iv_rolearn = |string|
  iv_synctype = |string|
  iv_triggerresourceupdateon = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lo_syncconfiguration = lo_result->get_syncconfiguration( ).
  IF lo_syncconfiguration IS NOT INITIAL.
    lv_branchname = lo_syncconfiguration->get_branch( ).
    lv_deploymentfilepath = lo_syncconfiguration->get_configfile( ).
    lv_ownerid = lo_syncconfiguration->get_ownerid( ).
    lv_providertype = lo_syncconfiguration->get_providertype( ).
    lv_repositorylinkid = lo_syncconfiguration->get_repositorylinkid( ).
    lv_repositoryname = lo_syncconfiguration->get_repositoryname( ).
    lv_resourcename = lo_syncconfiguration->get_resourcename( ).
    lv_iamrolearn = lo_syncconfiguration->get_rolearn( ).
    lv_syncconfigurationtype = lo_syncconfiguration->get_synctype( ).
    lv_publishdeploymentstatus = lo_syncconfiguration->get_publishdeploymentstatus( ).
    lv_triggerresourceupdateon = lo_syncconfiguration->get_triggerresourceupdateon( ).
    lv_pullrequestcomment = lo_syncconfiguration->get_pullrequestcomment( ).
  ENDIF.
ENDIF.