create_app_version_resource
async
¶
create_app_version_resource(
app_arn: Arn,
logical_resource_id: LogicalResourceId,
physical_resource_id: String2048,
resource_type: String255,
app_components: AppComponentNameList,
*,
config_overrides: Optional[AsyncresiliencehubClientConfig] = None,
resource_name: Optional[EntityName] = None,
aws_region: Optional[AwsRegion] = None,
aws_account_id: Optional[CustomerId] = None,
additional_info: Optional[AdditionalInfoMap] = None,
client_token: Optional[ClientToken] = None,
) -> CreateAppVersionResourceResponse
Adds a resource to the Resilience Hub application and assigns it to the specified Application Components. If you specify a new Application Component, Resilience Hub will automatically create the Application Component.
-
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
PublishAppVersionAPI. -
To update application version with new
physicalResourceID, you must callResolveAppVersionResourcesAPI.
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(LogicalResourceId) –Logical identifier of the resource.
-
physical_resource_id(String2048) –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(String255) –Type of resource.
-
app_components(AppComponentNameList) –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.
-
client_token(Optional[ClientToken], default:None) –Used for an idempotency token. A client token is a unique, case-sensitive string of up to 64 ASCII characters. You should not reuse the same client token for other API requests.
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
670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 | |