Updates the collection of resources that DevOps Guru analyzes. The two types of Amazon Web Services resource collections supported are Amazon Web Services CloudFormation stacks and Amazon Web Services resources that contain the same Amazon Web Services tag. DevOps Guru can be configured to analyze the Amazon Web Services resources that are defined in the stacks or that are tagged using the same tag key. You can specify up to 500 Amazon Web Services CloudFormation stacks. This method also creates the IAM role required for you to use DevOps Guru.
Parameters:
Raises:
-
AccessDeniedException
–
You don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see Access Management in the IAM User Guide.
-
ConflictException
–
An exception that is thrown when a conflict occurs.
-
InternalServerException
–
An internal failure in an Amazon service occurred.
-
ThrottlingException
–
The request was denied due to a request throttling.
-
ValidationException
–
Contains information about data passed in to a field during a request that is not valid.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_devops_guru/_services/async_dev_ops_guru.py
| async def update_resource_collection(
self,
action: "capo_devops_guru.types.update_resource_collection_action.UpdateResourceCollectionAction",
resource_collection: "capo_devops_guru.types.update_resource_collection_filter.UpdateResourceCollectionFilter",
*,
config_overrides: Optional[AsyncDevOpsGuruClientConfig] = None,
) -> "capo_devops_guru.types.update_resource_collection_response.UpdateResourceCollectionResponse":
"""<p> Updates the collection of resources that DevOps Guru analyzes. The two types of Amazon Web Services resource collections supported are Amazon Web Services CloudFormation stacks and Amazon Web Services resources that contain the same Amazon Web Services tag. DevOps Guru can be configured to analyze the Amazon Web Services resources that are defined in the stacks or that are tagged using the same tag <i>key</i>. You can specify up to 500 Amazon Web Services CloudFormation stacks. This method also creates the IAM role required for you to use DevOps Guru. </p>
Args:
action: <p> Specifies if the resource collection in the request is added or deleted to the resource collection. </p>
Raises:
capo_devops_guru.errors.access_denied_exception.AccessDeniedException: <p> You don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html">Access Management</a> in the <i>IAM User Guide</i>. </p>
capo_devops_guru.errors.conflict_exception.ConflictException: <p> An exception that is thrown when a conflict occurs. </p>
capo_devops_guru.errors.internal_server_exception.InternalServerException: <p>An internal failure in an Amazon service occurred.</p>
capo_devops_guru.errors.throttling_exception.ThrottlingException: <p>The request was denied due to a request throttling.</p>
capo_devops_guru.errors.validation_exception.ValidationException: <p> Contains information about data passed in to a field during a request that is not valid. </p>
capo_devops_guru.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_devops_guru.types.update_resource_collection_request.UpdateResourceCollectionRequest]",
) -> AsyncOperationResponse[
"capo_devops_guru.types.update_resource_collection_response.UpdateResourceCollectionResponse"
]:
import capo_devops_guru._operations.capstone_control_plane_service.update_resource_collection
(
output,
http_response,
) = await capo_devops_guru._operations.capstone_control_plane_service.update_resource_collection.async_update_resource_collection(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("UpdateResourceCollection")
)
input_: capo_devops_guru.types.update_resource_collection_request.UpdateResourceCollectionRequest = {
"action": action,
"resource_collection": resource_collection,
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|