Skip to content

remove_draft_app_version_resource_mappings async

remove_draft_app_version_resource_mappings(
    app_arn: Arn,
    *,
    config_overrides: Optional[AsyncresiliencehubClientConfig] = None,
    resource_names: Optional[EntityNameList] = None,
    logical_stack_names: Optional[String255List] = None,
    app_registry_app_names: Optional[EntityNameList] = None,
    resource_group_names: Optional[EntityNameList] = None,
    terraform_source_names: Optional[String255List] = None,
    eks_source_names: Optional[String255List] = None,
) -> RemoveDraftAppVersionResourceMappingsResponse

Removes resource mappings from a draft application version.

Parameters:

  • app_arn (Arn) –

    Amazon Resource Name (ARN) of the Resilience Hub application. The format for this ARN is: arn:partition:resiliencehub:region:account:app/app-id. For more information about ARNs, see Amazon Resource Names (ARNs) in the Amazon Web Services General Reference guide.

  • resource_names (Optional[EntityNameList], default: None ) –

    The names of the resources you want to remove from the resource mappings.

  • logical_stack_names (Optional[String255List], default: None ) –

    The names of the CloudFormation stacks you want to remove from the resource mappings.

  • app_registry_app_names (Optional[EntityNameList], default: None ) –

    The names of the registered applications you want to remove from the resource mappings.

  • resource_group_names (Optional[EntityNameList], default: None ) –

    The names of the resource groups you want to remove from the resource mappings.

  • terraform_source_names (Optional[String255List], default: None ) –

    The names of the Terraform sources you want to remove from the resource mappings.

  • eks_source_names (Optional[String255List], default: None ) –

    The names of the Amazon Elastic Kubernetes Service clusters and namespaces you want to remove from the resource mappings.

    This parameter accepts values in "eks-cluster/namespace" format.

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.

  • ConflictException –

    This exception occurs when a conflict with a previous successful write is detected. This generally occurs when the previous write did not have time to propagate to the host serving the current request. A retry (with appropriate backoff logic) is the recommended response to this exception.

  • InternalServerException –

    This exception occurs when there is an internal failure in the Resilience Hub service.

  • ResourceNotFoundException –

    This exception occurs when the specified resource could not be found.

  • ThrottlingException –

    This exception occurs when you have exceeded the limit on the number of requests per second.

  • ValidationException –

    This exception occurs when a request is not valid.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_resiliencehub/_services/async_resiliencehub.py
async def remove_draft_app_version_resource_mappings(
    self,
    app_arn: "capo_resiliencehub.types.arn.Arn",
    *,
    config_overrides: Optional[AsyncresiliencehubClientConfig] = None,
    resource_names: Optional[
        "capo_resiliencehub.types.entity_name_list.EntityNameList"
    ] = None,
    logical_stack_names: Optional[
        "capo_resiliencehub.types.string255_list.String255List"
    ] = None,
    app_registry_app_names: Optional[
        "capo_resiliencehub.types.entity_name_list.EntityNameList"
    ] = None,
    resource_group_names: Optional[
        "capo_resiliencehub.types.entity_name_list.EntityNameList"
    ] = None,
    terraform_source_names: Optional[
        "capo_resiliencehub.types.string255_list.String255List"
    ] = None,
    eks_source_names: Optional[
        "capo_resiliencehub.types.string255_list.String255List"
    ] = None,
) -> "capo_resiliencehub.types.remove_draft_app_version_resource_mappings_response.RemoveDraftAppVersionResourceMappingsResponse":
    """<p>Removes resource mappings from a draft application version.</p>

    Args:
        app_arn: <p>Amazon Resource Name (ARN) of the Resilience Hub application. The format for this ARN is: arn:<code>partition</code>:resiliencehub:<code>region</code>:<code>account</code>:app/<code>app-id</code>. For more information about ARNs, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html"> Amazon Resource Names (ARNs)</a> in the <i>Amazon Web Services General Reference</i> guide.</p>
        resource_names: <p>The names of the resources you want to remove from the resource mappings.</p>
        logical_stack_names: <p>The names of the CloudFormation stacks you want to remove from the resource mappings.</p>
        app_registry_app_names: <p>The names of the registered applications you want to remove from the resource mappings.</p>
        resource_group_names: <p>The names of the resource groups you want to remove from the resource mappings.</p>
        terraform_source_names: <p>The names of the Terraform sources you want to remove from the resource mappings.</p>
        eks_source_names: <p>The names of the Amazon Elastic Kubernetes Service clusters and namespaces you want to remove from the resource mappings.</p> <note> <p>This parameter accepts values in "eks-cluster/namespace" format.</p> </note>

    Raises:
        capo_resiliencehub.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.</p>
        capo_resiliencehub.errors.conflict_exception.ConflictException: <p>This exception occurs when a conflict with a previous successful write is detected. This generally occurs when the previous write did not have time to propagate to the host serving the current request. A retry (with appropriate backoff logic) is the recommended response to this exception.</p>
        capo_resiliencehub.errors.internal_server_exception.InternalServerException: <p>This exception occurs when there is an internal failure in the Resilience Hub service.</p>
        capo_resiliencehub.errors.resource_not_found_exception.ResourceNotFoundException: <p>This exception occurs when the specified resource could not be found.</p>
        capo_resiliencehub.errors.throttling_exception.ThrottlingException: <p>This exception occurs when you have exceeded the limit on the number of requests per second.</p>
        capo_resiliencehub.errors.validation_exception.ValidationException: <p>This exception occurs when a request is not valid.</p>
        capo_resiliencehub.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_resiliencehub.types.remove_draft_app_version_resource_mappings_request.RemoveDraftAppVersionResourceMappingsRequest]",
    ) -> AsyncOperationResponse[
        "capo_resiliencehub.types.remove_draft_app_version_resource_mappings_response.RemoveDraftAppVersionResourceMappingsResponse"
    ]:
        import capo_resiliencehub._operations.aws_resilience_hub.remove_draft_app_version_resource_mappings

        (
            output,
            http_response,
        ) = await capo_resiliencehub._operations.aws_resilience_hub.remove_draft_app_version_resource_mappings.async_remove_draft_app_version_resource_mappings(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("RemoveDraftAppVersionResourceMappings")
    )
    input_: capo_resiliencehub.types.remove_draft_app_version_resource_mappings_request.RemoveDraftAppVersionResourceMappingsRequest = {
        "app_arn": app_arn
    }
    if resource_names is not None:
        input_["resource_names"] = resource_names
    if logical_stack_names is not None:
        input_["logical_stack_names"] = logical_stack_names
    if app_registry_app_names is not None:
        input_["app_registry_app_names"] = app_registry_app_names
    if resource_group_names is not None:
        input_["resource_group_names"] = resource_group_names
    if terraform_source_names is not None:
        input_["terraform_source_names"] = terraform_source_names
    if eks_source_names is not None:
        input_["eks_source_names"] = eks_source_names

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output