Skip to content

/AWS1/IF_CFS=>PUTORGCONFORMANCEPACK()

About PutOrganizationConformancePack

Deploys conformance packs across member accounts in an Amazon Web Services Organization. For information on how many organization conformance packs and how many Config rules you can have per account, see Service Limits in the Config Developer Guide.

Only a management account and a delegated administrator can call this API. When calling this API with a delegated administrator, you must ensure Organizations ListDelegatedAdministrator permissions are added. An organization can have up to 3 delegated administrators.

When you use PutOrganizationConformancePack to deploy conformance packs across member accounts, the operation can create Config rules and remediation actions without requiring config:PutConfigRule or config:PutRemediationConfigurations permissions in member account IAM policies.

This API uses the AWSServiceRoleForConfigConforms service-linked role in each member account to create conformance pack resources. This service-linked role includes the permissions to create Config rules and remediation configurations, even if member account IAM policies explicitly deny these actions.

This API enables organization service access for config-multiaccountsetup.amazonaws.com through the EnableAWSServiceAccess action and creates a service-linked role AWSServiceRoleForConfigMultiAccountSetup in the management or delegated administrator account of your organization. The service-linked role is created only when the role does not exist in the caller account. To use this API with delegated administrator, register a delegated administrator by calling Amazon Web Services Organization register-delegate-admin for config-multiaccountsetup.amazonaws.com.

Prerequisite: Ensure you call EnableAllFeatures API to enable all features in an organization.

You must specify either the TemplateS3Uri or the TemplateBody parameter, but not both. If you provide both Config uses the TemplateS3Uri parameter and ignores the TemplateBody parameter.

Config sets the state of a conformance pack to CREATE_IN_PROGRESS and UPDATE_IN_PROGRESS until the conformance pack is created or updated. You cannot update a conformance pack while it is in this state.

Method Signature

IMPORTING

Required arguments:

iv_orgconformancepackname TYPE /AWS1/CFSORGCONFORMANCEPACKN00 /AWS1/CFSORGCONFORMANCEPACKN00

Name of the organization conformance pack you want to create.

Optional arguments:

iv_templates3uri TYPE /AWS1/CFSTEMPLATES3URI /AWS1/CFSTEMPLATES3URI

Location of file containing the template body. The uri must point to the conformance pack template (max size: 300 KB).

You must have access to read Amazon S3 bucket. In addition, in order to ensure a successful deployment, the template object must not be in an archived storage class if this parameter is passed.

iv_templatebody TYPE /AWS1/CFSTEMPLATEBODY /AWS1/CFSTEMPLATEBODY

A string that contains the full conformance pack template body. Structure containing the template body with a minimum length of 1 byte and a maximum length of 51,200 bytes.

iv_deliverys3bucket TYPE /AWS1/CFSDELIVERYS3BUCKET /AWS1/CFSDELIVERYS3BUCKET

The name of the Amazon S3 bucket where Config stores conformance pack templates.

This field is optional. If used, it must be prefixed with awsconfigconforms.

iv_deliverys3keyprefix TYPE /AWS1/CFSDELIVERYS3KEYPREFIX /AWS1/CFSDELIVERYS3KEYPREFIX

The prefix for the Amazon S3 bucket.

This field is optional.

it_conformancepackinpparams TYPE /AWS1/CL_CFSCONFORMANCEPACKI00=>TT_CONFORMANCEPACKINPUTPARAMS TT_CONFORMANCEPACKINPUTPARAMS

A list of ConformancePackInputParameter objects.

it_excludedaccounts TYPE /AWS1/CL_CFSEXCLUDEDACCOUNTS_W=>TT_EXCLUDEDACCOUNTS TT_EXCLUDEDACCOUNTS

A list of Amazon Web Services accounts to be excluded from an organization conformance pack while deploying a conformance pack.

RETURNING

oo_output TYPE REF TO /aws1/cl_cfsputorgconformanc01 /AWS1/CL_CFSPUTORGCONFORMANC01

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_cfs~putorgconformancepack(
  it_conformancepackinpparams = VALUE /aws1/cl_cfsconformancepacki00=>tt_conformancepackinputparams(
    (
      new /aws1/cl_cfsconformancepacki00(
        iv_parametername = |string|
        iv_parametervalue = |string|
      )
    )
  )
  it_excludedaccounts = VALUE /aws1/cl_cfsexcludedaccounts_w=>tt_excludedaccounts(
    ( new /aws1/cl_cfsexcludedaccounts_w( |string| ) )
  )
  iv_deliverys3bucket = |string|
  iv_deliverys3keyprefix = |string|
  iv_orgconformancepackname = |string|
  iv_templatebody = |string|
  iv_templates3uri = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv_stringwithcharlimit256 = lo_result->get_orgconformancepackarn( ).
ENDIF.