All associations for the managed nodes.
Parameters:
-
instance_id
(InstanceId)
–
The managed node ID for which you want to view all associations.
-
max_results
(Optional[EffectiveInstanceAssociationMaxResults], default:
None
)
–
The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.
-
next_token
(Optional[NextToken], default:
None
)
–
The token for the next set of items to return. (You received this token from a previous call.)
Raises:
-
InternalServerError
–
An error occurred on the server side.
-
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, and Stopping. Invalid states are: Shutting-down and Terminated.
-
InvalidNextToken
–
The specified token isn't valid.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_ssm/_services/ssm.py
| def describe_effective_instance_associations(
self,
instance_id: "capo_ssm.types.instance_id.InstanceId",
*,
config_overrides: Optional[SSMClientConfig] = None,
max_results: Optional[
"capo_ssm.types.effective_instance_association_max_results.EffectiveInstanceAssociationMaxResults"
] = None,
next_token: Optional["capo_ssm.types.next_token.NextToken"] = None,
) -> "capo_ssm.types.describe_effective_instance_associations_result.DescribeEffectiveInstanceAssociationsResult":
"""<p>All associations for the managed nodes.</p>
Args:
instance_id: <p>The managed node ID for which you want to view all associations.</p>
max_results: <p>The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.</p>
next_token: <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
Raises:
capo_ssm.errors.internal_server_error.InternalServerError: <p>An error occurred on the server side.</p>
capo_ssm.errors.invalid_instance_id.InvalidInstanceId: <p>The following problems can cause this exception:</p> <ul> <li> <p>You don't have permission to access the managed node.</p> </li> <li> <p>Amazon Web Services Systems Manager Agent (SSM Agent) isn't running. Verify that SSM Agent is running.</p> </li> <li> <p>SSM Agent isn't registered with the SSM endpoint. Try reinstalling SSM Agent.</p> </li> <li> <p>The managed node isn't in a valid state. Valid states are: <code>Running</code>, <code>Pending</code>, <code>Stopped</code>, and <code>Stopping</code>. Invalid states are: <code>Shutting-down</code> and <code>Terminated</code>.</p> </li> </ul>
capo_ssm.errors.invalid_next_token.InvalidNextToken: <p>The specified token isn't valid.</p>
capo_ssm.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_ssm.types.describe_effective_instance_associations_request.DescribeEffectiveInstanceAssociationsRequest]",
) -> OperationResponse[
"capo_ssm.types.describe_effective_instance_associations_result.DescribeEffectiveInstanceAssociationsResult"
]:
import capo_ssm._operations.amazon_ssm.describe_effective_instance_associations
output, http_response = (
capo_ssm._operations.amazon_ssm.describe_effective_instance_associations.describe_effective_instance_associations(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DescribeEffectiveInstanceAssociations")
)
input_: capo_ssm.types.describe_effective_instance_associations_request.DescribeEffectiveInstanceAssociationsRequest = {
"instance_id": instance_id
}
if max_results is not None:
input_["max_results"] = max_results
if next_token is not None:
input_["next_token"] = next_token
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|