Skip to content

update_app_version_resource async

update_app_version_resource(
    app_arn: Arn,
    *,
    config_overrides: Optional[AsyncresiliencehubClientConfig] = None,
    resource_name: Optional[EntityName] = None,
    logical_resource_id: Optional[LogicalResourceId] = None,
    physical_resource_id: Optional[String2048] = None,
    aws_region: Optional[AwsRegion] = None,
    aws_account_id: Optional[CustomerId] = None,
    resource_type: Optional[String255] = None,
    app_components: Optional[AppComponentNameList] = None,
    additional_info: Optional[AdditionalInfoMap] = None,
    excluded: Optional[BooleanOptional] = None,
) -> UpdateAppVersionResourceResponse

Updates the resource details in the Resilience Hub application.

  • This action has no effect outside Resilience Hub.

  • This API updates the Resilience Hub application draft version. To use this resource for running resiliency assessments, you must publish the Resilience Hub application using the PublishAppVersion API.

  • To update application version with new physicalResourceID, you must call ResolveAppVersionResources API.

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_name (Optional[EntityName], default: None ) –

    Name of the resource.

  • logical_resource_id (Optional[LogicalResourceId], default: None ) –

    Logical identifier of the resource.

  • physical_resource_id (Optional[String2048], default: None ) –

    Physical identifier of the resource.

  • aws_region (Optional[AwsRegion], default: None ) –

    Amazon Web Services region that owns the physical resource.

  • aws_account_id (Optional[CustomerId], default: None ) –

    Amazon Web Services account that owns the physical resource.

  • resource_type (Optional[String255], default: None ) –

    Type of resource.

  • app_components (Optional[AppComponentNameList], default: None ) –

    List of Application Components that this resource belongs to. If an Application Component is not part of the Resilience Hub application, it will be added.

  • additional_info (Optional[AdditionalInfoMap], default: None ) –

    Currently, there is no supported additional information for resources.

  • excluded (Optional[BooleanOptional], default: None ) –

    Indicates if a resource is excluded from an Resilience Hub application.

    You can exclude only imported resources from an Resilience Hub application.

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.

  • ServiceQuotaExceededException –

    This exception occurs when you have exceeded your service quota. To perform the requested action, remove some of the relevant resources, or use Service Quotas to request a service quota increase.

  • 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 update_app_version_resource(
    self,
    app_arn: "capo_resiliencehub.types.arn.Arn",
    *,
    config_overrides: Optional[AsyncresiliencehubClientConfig] = None,
    resource_name: Optional[
        "capo_resiliencehub.types.entity_name.EntityName"
    ] = None,
    logical_resource_id: Optional[
        "capo_resiliencehub.types.logical_resource_id.LogicalResourceId"
    ] = None,
    physical_resource_id: Optional[
        "capo_resiliencehub.types.string2048.String2048"
    ] = None,
    aws_region: Optional["capo_resiliencehub.types.aws_region.AwsRegion"] = None,
    aws_account_id: Optional[
        "capo_resiliencehub.types.customer_id.CustomerId"
    ] = None,
    resource_type: Optional["capo_resiliencehub.types.string255.String255"] = None,
    app_components: Optional[
        "capo_resiliencehub.types.app_component_name_list.AppComponentNameList"
    ] = None,
    additional_info: Optional[
        "capo_resiliencehub.types.additional_info_map.AdditionalInfoMap"
    ] = None,
    excluded: Optional[
        "capo_resiliencehub.types.boolean_optional.BooleanOptional"
    ] = None,
) -> "capo_resiliencehub.types.update_app_version_resource_response.UpdateAppVersionResourceResponse":
    """<p>Updates the resource details in the Resilience Hub application.</p> <note> <ul> <li> <p>This action has no effect outside Resilience Hub.</p> </li> <li> <p>This API updates the Resilience Hub application draft version. To use this resource for running resiliency assessments, you must publish the Resilience Hub application using the <code>PublishAppVersion</code> API.</p> </li> <li> <p>To update application version with new <code>physicalResourceID</code>, you must call <code>ResolveAppVersionResources</code> API.</p> </li> </ul> </note>

    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_name: <p>Name of the resource.</p>
        logical_resource_id: <p>Logical identifier of the resource.</p>
        physical_resource_id: <p>Physical identifier of the resource.</p>
        aws_region: <p>Amazon Web Services region that owns the physical resource.</p>
        aws_account_id: <p>Amazon Web Services account that owns the physical resource.</p>
        resource_type: <p>Type of resource.</p>
        app_components: <p>List of Application Components that this resource belongs to. If an Application Component is not part of the Resilience Hub application, it will be added.</p>
        additional_info: <p>Currently, there is no supported additional information for resources.</p>
        excluded: <p>Indicates if a resource is excluded from an Resilience Hub application.</p> <note> <p>You can exclude only imported resources from an Resilience Hub application.</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.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>This exception occurs when you have exceeded your service quota. To perform the requested action, remove some of the relevant resources, or use Service Quotas to request a service quota increase.</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.update_app_version_resource_request.UpdateAppVersionResourceRequest]",
    ) -> AsyncOperationResponse[
        "capo_resiliencehub.types.update_app_version_resource_response.UpdateAppVersionResourceResponse"
    ]:
        import capo_resiliencehub._operations.aws_resilience_hub.update_app_version_resource

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateAppVersionResource")
    )
    input_: capo_resiliencehub.types.update_app_version_resource_request.UpdateAppVersionResourceRequest = {
        "app_arn": app_arn
    }
    if resource_name is not None:
        input_["resource_name"] = resource_name
    if logical_resource_id is not None:
        input_["logical_resource_id"] = logical_resource_id
    if physical_resource_id is not None:
        input_["physical_resource_id"] = physical_resource_id
    if aws_region is not None:
        input_["aws_region"] = aws_region
    if aws_account_id is not None:
        input_["aws_account_id"] = aws_account_id
    if resource_type is not None:
        input_["resource_type"] = resource_type
    if app_components is not None:
        input_["app_components"] = app_components
    if additional_info is not None:
        input_["additional_info"] = additional_info
    if excluded is not None:
        input_["excluded"] = excluded

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