Skip to content

/AWS1/CL_SSMCREASSOCIATIONBT01

Describes the association of a Amazon Web Services Systems Manager document (SSM document) and a managed node.

CONSTRUCTOR

IMPORTING

Required arguments:

iv_name TYPE /AWS1/SSMDOCUMENTARN /AWS1/SSMDOCUMENTARN

The name of the SSM document that contains the configuration information for the managed node. You can specify Command or Automation runbooks.

You can specify Amazon Web Services-predefined documents, documents you created, or a document that is shared with you from another account.

For SSM documents that are shared with you from other Amazon Web Services accounts, you must specify the complete SSM document ARN, in the following format:

arn:aws:ssm:region:account-id:document/document-name

For example:

arn:aws:ssm:us-east-2:12345678912:document/My-Shared-Document

For Amazon Web Services-predefined documents and SSM documents you created in your account, you only need to specify the document name. For example, AWS-ApplyPatchBaseline or My-Document.

Optional arguments:

iv_instanceid TYPE /AWS1/SSMINSTANCEID /AWS1/SSMINSTANCEID

The managed node ID.

InstanceId has been deprecated. To specify a managed node ID for an association, use the Targets parameter. Requests that include the parameter InstanceID with Systems Manager documents (SSM documents) that use schema version 2.0 or later will fail. In addition, if you use the parameter InstanceId, you can't use the parameters AssociationName, DocumentVersion, MaxErrors, MaxConcurrency, OutputLocation, or ScheduleExpression. To use these parameters, you must use the Targets parameter.

it_parameters TYPE /AWS1/CL_SSMPARAMVALUELIST_W=>TT_PARAMETERS TT_PARAMETERS

A description of the parameters for a document.

iv_automationtargetparamname TYPE /AWS1/SSMAUTOMATIONTGTPARMNAME /AWS1/SSMAUTOMATIONTGTPARMNAME

Specify the target for the association. This target is required for associations that use an Automation runbook and target resources by using rate controls. Automation is a tool in Amazon Web Services Systems Manager.

iv_documentversion TYPE /AWS1/SSMDOCUMENTVERSION /AWS1/SSMDOCUMENTVERSION

The document version.

it_targets TYPE /AWS1/CL_SSMTARGET=>TT_TARGETS TT_TARGETS

The managed nodes targeted by the request.

iv_scheduleexpression TYPE /AWS1/SSMSCHEDULEEXPRESSION /AWS1/SSMSCHEDULEEXPRESSION

A cron expression that specifies a schedule when the association runs.

io_outputlocation TYPE REF TO /AWS1/CL_SSMINSTASSOCIATIONO00 /AWS1/CL_SSMINSTASSOCIATIONO00

An S3 bucket where you want to store the results of this request.

iv_associationname TYPE /AWS1/SSMASSOCIATIONNAME /AWS1/SSMASSOCIATIONNAME

Specify a descriptive name for the association.

iv_maxerrors TYPE /AWS1/SSMMAXERRORS /AWS1/SSMMAXERRORS

The number of errors that are allowed before the system stops sending requests to run the association on additional targets. You can specify either an absolute number of errors, for example 10, or a percentage of the target set, for example 10%. If you specify 3, for example, the system stops sending requests when the fourth error is received. If you specify 0, then the system stops sending requests after the first error is returned. If you run an association on 50 managed nodes and set MaxError to 10%, then the system stops sending the request when the sixth error is received.

Executions that are already running an association when MaxErrors is reached are allowed to complete, but some of these executions may fail as well. If you need to ensure that there won't be more than max-errors failed executions, set MaxConcurrency to 1 so that executions proceed one at a time.

iv_maxconcurrency TYPE /AWS1/SSMMAXCONCURRENCY /AWS1/SSMMAXCONCURRENCY

The maximum number of targets allowed to run the association at the same time. You can specify a number, for example 10, or a percentage of the target set, for example 10%. The default value is 100%, which means all targets run the association at the same time.

If a new managed node starts and attempts to run an association while Systems Manager is running MaxConcurrency associations, the association is allowed to run. During the next association interval, the new managed node will process its association within the limit specified for MaxConcurrency.

iv_complianceseverity TYPE /AWS1/SSMASSOCIATIONCPLNCSEV00 /AWS1/SSMASSOCIATIONCPLNCSEV00

The severity level to assign to the association.

iv_synccompliance TYPE /AWS1/SSMASSOCIATIONSYNCCPLNC /AWS1/SSMASSOCIATIONSYNCCPLNC

The mode for generating association compliance. You can specify AUTO or MANUAL. In AUTO mode, the system uses the status of the association execution to determine the compliance status. If the association execution runs successfully, then the association is COMPLIANT. If the association execution doesn't run successfully, the association is NON-COMPLIANT.

In MANUAL mode, you must specify the AssociationId as a parameter for the PutComplianceItems API operation. In this case, compliance data isn't managed by State Manager, a tool in Amazon Web Services Systems Manager. It is managed by your direct call to the PutComplianceItems API operation.

By default, all associations use AUTO mode.

iv_applyonlyatcroninterval TYPE /AWS1/SSMAPPLYONLYATCRONINTE00 /AWS1/SSMAPPLYONLYATCRONINTE00

By default, when you create a new association, the system runs it immediately after it is created and then according to the schedule you specified and when target changes are detected. Specify true for ApplyOnlyAtCronInterval if you want the association to run only according to the schedule you specified.

For more information, see Understanding when associations are applied to resources and >About target updates with Automation runbooks in the Amazon Web Services Systems Manager User Guide.

This parameter isn't supported for rate expressions.

it_calendarnames TYPE /AWS1/CL_SSMCALENDARNAMEORAR00=>TT_CALENDARNAMEORARNLIST TT_CALENDARNAMEORARNLIST

The names or Amazon Resource Names (ARNs) of the Change Calendar type documents your associations are gated under. The associations only run when that Change Calendar is open. For more information, see Amazon Web Services Systems Manager Change Calendar in the Amazon Web Services Systems Manager User Guide.

it_targetlocations TYPE /AWS1/CL_SSMTARGETLOCATION=>TT_TARGETLOCATIONS TT_TARGETLOCATIONS

Use this action to create an association in multiple Regions and multiple accounts.

iv_scheduleoffset TYPE /AWS1/SSMSCHEDULEOFFSET /AWS1/SSMSCHEDULEOFFSET

Number of days to wait after the scheduled day to run an association.

iv_duration TYPE /AWS1/SSMDURATION /AWS1/SSMDURATION

The number of hours the association can run before it is canceled. Duration applies to associations that are currently running, and any pending and in progress commands on all targets. If a target was taken offline for the association to run, it is made available again immediately, without a reboot.

The Duration parameter applies only when both these conditions are true:

  • The association for which you specify a duration is cancelable according to the parameters of the SSM command document or Automation runbook associated with this execution.

  • The command specifies the ApplyOnlyAtCronInterval parameter, which means that the association doesn't run immediately after it is created, but only according to the specified schedule.

it_targetmaps TYPE /AWS1/CL_SSMTGTMAPVALUELIST_W=>TT_TARGETMAPS TT_TARGETMAPS

A key-value mapping of document parameters to target resources. Both Targets and TargetMaps can't be specified together.

io_alarmconfiguration TYPE REF TO /AWS1/CL_SSMALARMCONFIGURATION /AWS1/CL_SSMALARMCONFIGURATION

AlarmConfiguration


Queryable Attributes

Name

The name of the SSM document that contains the configuration information for the managed node. You can specify Command or Automation runbooks.

You can specify Amazon Web Services-predefined documents, documents you created, or a document that is shared with you from another account.

For SSM documents that are shared with you from other Amazon Web Services accounts, you must specify the complete SSM document ARN, in the following format:

arn:aws:ssm:region:account-id:document/document-name

For example:

arn:aws:ssm:us-east-2:12345678912:document/My-Shared-Document

For Amazon Web Services-predefined documents and SSM documents you created in your account, you only need to specify the document name. For example, AWS-ApplyPatchBaseline or My-Document.

Accessible with the following methods

Method Description
GET_NAME() Getter for NAME, with configurable default
ASK_NAME() Getter for NAME w/ exceptions if field has no value
HAS_NAME() Determine if NAME has a value

InstanceId

The managed node ID.

InstanceId has been deprecated. To specify a managed node ID for an association, use the Targets parameter. Requests that include the parameter InstanceID with Systems Manager documents (SSM documents) that use schema version 2.0 or later will fail. In addition, if you use the parameter InstanceId, you can't use the parameters AssociationName, DocumentVersion, MaxErrors, MaxConcurrency, OutputLocation, or ScheduleExpression. To use these parameters, you must use the Targets parameter.

Accessible with the following methods

Method Description
GET_INSTANCEID() Getter for INSTANCEID, with configurable default
ASK_INSTANCEID() Getter for INSTANCEID w/ exceptions if field has no value
HAS_INSTANCEID() Determine if INSTANCEID has a value

Parameters

A description of the parameters for a document.

Accessible with the following methods

Method Description
GET_PARAMETERS() Getter for PARAMETERS, with configurable default
ASK_PARAMETERS() Getter for PARAMETERS w/ exceptions if field has no value
HAS_PARAMETERS() Determine if PARAMETERS has a value

AutomationTargetParameterName

Specify the target for the association. This target is required for associations that use an Automation runbook and target resources by using rate controls. Automation is a tool in Amazon Web Services Systems Manager.

Accessible with the following methods

Method Description
GET_AUTOMATIONTGTPARAMNAME() Getter for AUTOMATIONTARGETPARAMNAME, with configurable defa
ASK_AUTOMATIONTGTPARAMNAME() Getter for AUTOMATIONTARGETPARAMNAME w/ exceptions if field
HAS_AUTOMATIONTGTPARAMNAME() Determine if AUTOMATIONTARGETPARAMNAME has a value

DocumentVersion

The document version.

Accessible with the following methods

Method Description
GET_DOCUMENTVERSION() Getter for DOCUMENTVERSION, with configurable default
ASK_DOCUMENTVERSION() Getter for DOCUMENTVERSION w/ exceptions if field has no val
HAS_DOCUMENTVERSION() Determine if DOCUMENTVERSION has a value

Targets

The managed nodes targeted by the request.

Accessible with the following methods

Method Description
GET_TARGETS() Getter for TARGETS, with configurable default
ASK_TARGETS() Getter for TARGETS w/ exceptions if field has no value
HAS_TARGETS() Determine if TARGETS has a value

ScheduleExpression

A cron expression that specifies a schedule when the association runs.

Accessible with the following methods

Method Description
GET_SCHEDULEEXPRESSION() Getter for SCHEDULEEXPRESSION, with configurable default
ASK_SCHEDULEEXPRESSION() Getter for SCHEDULEEXPRESSION w/ exceptions if field has no
HAS_SCHEDULEEXPRESSION() Determine if SCHEDULEEXPRESSION has a value

OutputLocation

An S3 bucket where you want to store the results of this request.

Accessible with the following methods

Method Description
GET_OUTPUTLOCATION() Getter for OUTPUTLOCATION

AssociationName

Specify a descriptive name for the association.

Accessible with the following methods

Method Description
GET_ASSOCIATIONNAME() Getter for ASSOCIATIONNAME, with configurable default
ASK_ASSOCIATIONNAME() Getter for ASSOCIATIONNAME w/ exceptions if field has no val
HAS_ASSOCIATIONNAME() Determine if ASSOCIATIONNAME has a value

MaxErrors

The number of errors that are allowed before the system stops sending requests to run the association on additional targets. You can specify either an absolute number of errors, for example 10, or a percentage of the target set, for example 10%. If you specify 3, for example, the system stops sending requests when the fourth error is received. If you specify 0, then the system stops sending requests after the first error is returned. If you run an association on 50 managed nodes and set MaxError to 10%, then the system stops sending the request when the sixth error is received.

Executions that are already running an association when MaxErrors is reached are allowed to complete, but some of these executions may fail as well. If you need to ensure that there won't be more than max-errors failed executions, set MaxConcurrency to 1 so that executions proceed one at a time.

Accessible with the following methods

Method Description
GET_MAXERRORS() Getter for MAXERRORS, with configurable default
ASK_MAXERRORS() Getter for MAXERRORS w/ exceptions if field has no value
HAS_MAXERRORS() Determine if MAXERRORS has a value

MaxConcurrency

The maximum number of targets allowed to run the association at the same time. You can specify a number, for example 10, or a percentage of the target set, for example 10%. The default value is 100%, which means all targets run the association at the same time.

If a new managed node starts and attempts to run an association while Systems Manager is running MaxConcurrency associations, the association is allowed to run. During the next association interval, the new managed node will process its association within the limit specified for MaxConcurrency.

Accessible with the following methods

Method Description
GET_MAXCONCURRENCY() Getter for MAXCONCURRENCY, with configurable default
ASK_MAXCONCURRENCY() Getter for MAXCONCURRENCY w/ exceptions if field has no valu
HAS_MAXCONCURRENCY() Determine if MAXCONCURRENCY has a value

ComplianceSeverity

The severity level to assign to the association.

Accessible with the following methods

Method Description
GET_COMPLIANCESEVERITY() Getter for COMPLIANCESEVERITY, with configurable default
ASK_COMPLIANCESEVERITY() Getter for COMPLIANCESEVERITY w/ exceptions if field has no
HAS_COMPLIANCESEVERITY() Determine if COMPLIANCESEVERITY has a value

SyncCompliance

The mode for generating association compliance. You can specify AUTO or MANUAL. In AUTO mode, the system uses the status of the association execution to determine the compliance status. If the association execution runs successfully, then the association is COMPLIANT. If the association execution doesn't run successfully, the association is NON-COMPLIANT.

In MANUAL mode, you must specify the AssociationId as a parameter for the PutComplianceItems API operation. In this case, compliance data isn't managed by State Manager, a tool in Amazon Web Services Systems Manager. It is managed by your direct call to the PutComplianceItems API operation.

By default, all associations use AUTO mode.

Accessible with the following methods

Method Description
GET_SYNCCOMPLIANCE() Getter for SYNCCOMPLIANCE, with configurable default
ASK_SYNCCOMPLIANCE() Getter for SYNCCOMPLIANCE w/ exceptions if field has no valu
HAS_SYNCCOMPLIANCE() Determine if SYNCCOMPLIANCE has a value

ApplyOnlyAtCronInterval

By default, when you create a new association, the system runs it immediately after it is created and then according to the schedule you specified and when target changes are detected. Specify true for ApplyOnlyAtCronInterval if you want the association to run only according to the schedule you specified.

For more information, see Understanding when associations are applied to resources and >About target updates with Automation runbooks in the Amazon Web Services Systems Manager User Guide.

This parameter isn't supported for rate expressions.

Accessible with the following methods

Method Description
GET_APPLYONLYATCRONINTERVAL() Getter for APPLYONLYATCRONINTERVAL

CalendarNames

The names or Amazon Resource Names (ARNs) of the Change Calendar type documents your associations are gated under. The associations only run when that Change Calendar is open. For more information, see Amazon Web Services Systems Manager Change Calendar in the Amazon Web Services Systems Manager User Guide.

Accessible with the following methods

Method Description
GET_CALENDARNAMES() Getter for CALENDARNAMES, with configurable default
ASK_CALENDARNAMES() Getter for CALENDARNAMES w/ exceptions if field has no value
HAS_CALENDARNAMES() Determine if CALENDARNAMES has a value

TargetLocations

Use this action to create an association in multiple Regions and multiple accounts.

Accessible with the following methods

Method Description
GET_TARGETLOCATIONS() Getter for TARGETLOCATIONS, with configurable default
ASK_TARGETLOCATIONS() Getter for TARGETLOCATIONS w/ exceptions if field has no val
HAS_TARGETLOCATIONS() Determine if TARGETLOCATIONS has a value

ScheduleOffset

Number of days to wait after the scheduled day to run an association.

Accessible with the following methods

Method Description
GET_SCHEDULEOFFSET() Getter for SCHEDULEOFFSET, with configurable default
ASK_SCHEDULEOFFSET() Getter for SCHEDULEOFFSET w/ exceptions if field has no valu
HAS_SCHEDULEOFFSET() Determine if SCHEDULEOFFSET has a value

Duration

The number of hours the association can run before it is canceled. Duration applies to associations that are currently running, and any pending and in progress commands on all targets. If a target was taken offline for the association to run, it is made available again immediately, without a reboot.

The Duration parameter applies only when both these conditions are true:

  • The association for which you specify a duration is cancelable according to the parameters of the SSM command document or Automation runbook associated with this execution.

  • The command specifies the ApplyOnlyAtCronInterval parameter, which means that the association doesn't run immediately after it is created, but only according to the specified schedule.

Accessible with the following methods

Method Description
GET_DURATION() Getter for DURATION, with configurable default
ASK_DURATION() Getter for DURATION w/ exceptions if field has no value
HAS_DURATION() Determine if DURATION has a value

TargetMaps

A key-value mapping of document parameters to target resources. Both Targets and TargetMaps can't be specified together.

Accessible with the following methods

Method Description
GET_TARGETMAPS() Getter for TARGETMAPS, with configurable default
ASK_TARGETMAPS() Getter for TARGETMAPS w/ exceptions if field has no value
HAS_TARGETMAPS() Determine if TARGETMAPS has a value

AlarmConfiguration

AlarmConfiguration

Accessible with the following methods

Method Description
GET_ALARMCONFIGURATION() Getter for ALARMCONFIGURATION

Public Local Types In This Class

Internal table types, representing arrays and maps of this class, are defined as local types:

TT_CREASSOCIATIONBTCREQENTRIES

TYPES TT_CREASSOCIATIONBTCREQENTRIES TYPE STANDARD TABLE OF REF TO /AWS1/CL_SSMCREASSOCIATIONBT01 WITH DEFAULT KEY
.