create_association_batch
¶
create_association_batch(
entries: CreateAssociationBatchRequestEntries,
*,
config_overrides: Optional[SSMClientConfig] = None,
association_dispatch_assume_role: Optional[AssociationDispatchAssumeRoleArn] = None,
) -> CreateAssociationBatchResult
Associates the specified Amazon Web Services Systems Manager document (SSM document) with the specified managed nodes or targets.
When you associate a document with one or more managed nodes using IDs or tags, Amazon Web Services Systems Manager Agent (SSM Agent) running on the managed node processes the document and configures the node as specified.
If you associate a document with a managed node that already has an associated document, the system returns the AssociationAlreadyExists exception.
Parameters:
-
entries(CreateAssociationBatchRequestEntries) –One or more associations.
-
association_dispatch_assume_role(Optional[AssociationDispatchAssumeRoleArn], default:None) –A role used by association to take actions on your behalf. State Manager will assume this role and call required APIs when dispatching configurations to nodes. If not specified, service-linked role for Systems Manager will be used by default.
It is recommended that you define a custom IAM role so that you have full control of the permissions that State Manager has when taking actions on your behalf.
Service-linked role support in State Manager is being phased out. Associations relying on service-linked role may require updates in the future to continue functioning properly.
Raises:
-
AssociationLimitExceeded–You can have at most 2,000 active associations.
-
DuplicateInstanceId–You can't specify a managed node ID in more than one association.
-
InternalServerError–An error occurred on the server side.
-
InvalidDocument–The specified SSM document doesn't exist.
-
InvalidDocumentVersion–The document version isn't valid or doesn't exist.
-
InvalidInstanceId–The following problems can cause this exception:
-
You don't have permission to access the managed node.
-
Amazon Web Services Systems Manager Agent (SSM Agent) isn't running. Verify that SSM Agent is running.
-
SSM Agent isn't registered with the SSM endpoint. Try reinstalling SSM Agent.
-
The managed node isn't in a valid state. Valid states are:
Running,Pending,Stopped, andStopping. Invalid states are:Shutting-downandTerminated.
-
-
InvalidOutputLocation–The output location isn't valid or doesn't exist.
-
InvalidParameters–You must specify values for all required parameters in the Amazon Web Services Systems Manager document (SSM document). You can only supply values to parameters defined in the SSM document.
-
InvalidSchedule–The schedule is invalid. Verify your cron or rate expression and try again.
-
InvalidTarget–The target isn't valid or doesn't exist. It might not be configured for Systems Manager or you might not have permission to perform the operation.
-
InvalidTargetMaps–TargetMap parameter isn't valid.
-
UnsupportedPlatformType–The document doesn't support the platform type of the given managed node IDs. For example, you sent an document for a Windows managed node to a Linux node.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_ssm/_services/ssm.py
1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 | |