Returns all State Manager associations in the current Amazon Web Services account and Amazon Web Services Region. You can limit the results to a specific State Manager association document or managed node by specifying a filter. State Manager is a tool in Amazon Web Services Systems Manager.
Parameters:
-
association_filter_list
(Optional[AssociationFilterList], default:
None
)
–
One or more filters. Use a filter to return a more specific list of results.
Filtering associations using the InstanceID attribute only returns legacy associations created using the InstanceID attribute. Associations targeting the managed node that are part of the Target Attributes ResourceGroup or Tags aren't returned.
-
max_results
(Optional[MaxResults], 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:
Source code in docs_src/capo_ssm/_services/ssm.py
| def list_associations(
self,
*,
config_overrides: Optional[SSMClientConfig] = None,
association_filter_list: Optional[
"capo_ssm.types.association_filter_list.AssociationFilterList"
] = None,
max_results: Optional["capo_ssm.types.max_results.MaxResults"] = None,
next_token: Optional["capo_ssm.types.next_token.NextToken"] = None,
) -> "capo_ssm.types.list_associations_result.ListAssociationsResult":
"""<p>Returns all State Manager associations in the current Amazon Web Services account and Amazon Web Services Region. You can limit the results to a specific State Manager association document or managed node by specifying a filter. State Manager is a tool in Amazon Web Services Systems Manager.</p>
Args:
association_filter_list: <p>One or more filters. Use a filter to return a more specific list of results.</p> <note> <p>Filtering associations using the <code>InstanceID</code> attribute only returns legacy associations created using the <code>InstanceID</code> attribute. Associations targeting the managed node that are part of the Target Attributes <code>ResourceGroup</code> or <code>Tags</code> aren't returned.</p> </note>
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_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.list_associations_request.ListAssociationsRequest]",
) -> OperationResponse[
"capo_ssm.types.list_associations_result.ListAssociationsResult"
]:
import capo_ssm._operations.amazon_ssm.list_associations
output, http_response = (
capo_ssm._operations.amazon_ssm.list_associations.list_associations(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListAssociations")
)
input_: capo_ssm.types.list_associations_request.ListAssociationsRequest = {}
if association_filter_list is not None:
input_["association_filter_list"] = association_filter_list
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
|