Query a set of OpsItems. You must have permission in Identity and Access Management (IAM) to query a list of OpsItems. For more information, see Set up OpsCenter in the Amazon Web Services Systems Manager User Guide.
Operations engineers and IT professionals use Amazon Web Services Systems Manager OpsCenter to view, investigate, and remediate operational issues impacting the performance and health of their Amazon Web Services resources. For more information, see Amazon Web Services Systems Manager OpsCenter in the Amazon Web Services Systems Manager User Guide.
Parameters:
-
ops_item_filters
(Optional[OpsItemFilters], default:
None
)
–
One or more filters to limit the response.
-
Key: CreatedTime
Operations: GreaterThan, LessThan
-
Key: LastModifiedBy
Operations: Contains, Equals
-
Key: LastModifiedTime
Operations: GreaterThan, LessThan
-
Key: Priority
Operations: Equals
-
Key: Source
Operations: Contains, Equals
-
Key: Status
Operations: Equals
-
Key: Title*
Operations: Equals,Contains
-
Key: OperationalData**
Operations: Equals
-
Key: OperationalDataKey
Operations: Equals
-
Key: OperationalDataValue
Operations: Equals, Contains
-
Key: OpsItemId
Operations: Equals
-
Key: ResourceId
Operations: Contains
-
Key: AutomationId
Operations: Equals
-
Key: AccountId
Operations: Equals
*The Equals operator for Title matches the first 100 characters. If you specify more than 100 characters, they system returns an error that the filter value exceeds the length limit.
**If you filter the response by using the OperationalData operator, specify a key-value pair by using the following JSON format: {"key":"key_name","value":"a_value"}
-
max_results
(Optional[OpsItemMaxResults], 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[String], default:
None
)
–
A token to start the list. Use this token to get the next set of results.
Raises:
Source code in docs_src/capo_ssm/_services/async_ssm.py
| async def describe_ops_items(
self,
*,
config_overrides: Optional[AsyncSSMClientConfig] = None,
ops_item_filters: Optional[
"capo_ssm.types.ops_item_filters.OpsItemFilters"
] = None,
max_results: Optional[
"capo_ssm.types.ops_item_max_results.OpsItemMaxResults"
] = None,
next_token: Optional["capo_ssm.types.string.String"] = None,
) -> "capo_ssm.types.describe_ops_items_response.DescribeOpsItemsResponse":
"""<p>Query a set of OpsItems. You must have permission in Identity and Access Management (IAM) to query a list of OpsItems. For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-setup.html">Set up OpsCenter</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p> <p>Operations engineers and IT professionals use Amazon Web Services Systems Manager OpsCenter to view, investigate, and remediate operational issues impacting the performance and health of their Amazon Web Services resources. For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter.html">Amazon Web Services Systems Manager OpsCenter</a> in the <i>Amazon Web Services Systems Manager User Guide</i>. </p>
Args:
ops_item_filters: <p>One or more filters to limit the response.</p> <ul> <li> <p>Key: CreatedTime</p> <p>Operations: GreaterThan, LessThan</p> </li> <li> <p>Key: LastModifiedBy</p> <p>Operations: Contains, Equals</p> </li> <li> <p>Key: LastModifiedTime</p> <p>Operations: GreaterThan, LessThan</p> </li> <li> <p>Key: Priority</p> <p>Operations: Equals</p> </li> <li> <p>Key: Source</p> <p>Operations: Contains, Equals</p> </li> <li> <p>Key: Status</p> <p>Operations: Equals</p> </li> <li> <p>Key: Title*</p> <p>Operations: Equals,Contains</p> </li> <li> <p>Key: OperationalData**</p> <p>Operations: Equals</p> </li> <li> <p>Key: OperationalDataKey</p> <p>Operations: Equals</p> </li> <li> <p>Key: OperationalDataValue</p> <p>Operations: Equals, Contains</p> </li> <li> <p>Key: OpsItemId</p> <p>Operations: Equals</p> </li> <li> <p>Key: ResourceId</p> <p>Operations: Contains</p> </li> <li> <p>Key: AutomationId</p> <p>Operations: Equals</p> </li> <li> <p>Key: AccountId</p> <p>Operations: Equals</p> </li> </ul> <p>*The Equals operator for Title matches the first 100 characters. If you specify more than 100 characters, they system returns an error that the filter value exceeds the length limit.</p> <p>**If you filter the response by using the OperationalData operator, specify a key-value pair by using the following JSON format: {"key":"key_name","value":"a_value"}</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>A token to start the list. Use this token to get the next set of results.</p>
Raises:
capo_ssm.errors.internal_server_error.InternalServerError: <p>An error occurred on the server side.</p>
capo_ssm.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_ssm.types.describe_ops_items_request.DescribeOpsItemsRequest]",
) -> AsyncOperationResponse[
"capo_ssm.types.describe_ops_items_response.DescribeOpsItemsResponse"
]:
import capo_ssm._operations.amazon_ssm.describe_ops_items
(
output,
http_response,
) = await capo_ssm._operations.amazon_ssm.describe_ops_items.async_describe_ops_items(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DescribeOpsItems")
)
input_: capo_ssm.types.describe_ops_items_request.DescribeOpsItemsRequest = {}
if ops_item_filters is not None:
input_["ops_item_filters"] = ops_item_filters
if max_results is not None:
input_["max_results"] = max_results
if next_token is not None:
input_["next_token"] = next_token
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|