create_resiliency_policy
¶
create_resiliency_policy(
policy_name: EntityName,
tier: ResiliencyPolicyTier,
policy: DisruptionPolicy,
*,
config_overrides: Optional[resiliencehubClientConfig] = None,
policy_description: Optional[EntityDescription] = None,
data_location_constraint: Optional[DataLocationConstraint] = None,
client_token: Optional[ClientToken] = None,
tags: Optional[TagMap] = None,
) -> CreateResiliencyPolicyResponse
Creates a resiliency policy for an application.
Resilience Hub allows you to provide a value of zero for rtoInSecs and rpoInSecs of your resiliency policy. But, while assessing your application, the lowest possible assessment result is near zero. Hence, if you provide value zero for rtoInSecs and rpoInSecs, the estimated workload RTO and estimated workload RPO result will be near zero and the Compliance status for your application will be set to Policy breached.
Parameters:
-
policy_name(EntityName) –Name of the resiliency policy.
-
policy_description(Optional[EntityDescription], default:None) –Description of the resiliency policy.
-
data_location_constraint(Optional[DataLocationConstraint], default:None) –Specifies a high-level geographical location constraint for where your resilience policy data can be stored.
-
tier(ResiliencyPolicyTier) –The tier for this resiliency policy, ranging from the highest severity (
MissionCritical) to lowest (NonCritical). -
policy(DisruptionPolicy) –The type of resiliency policy to be created, including the recovery time objective (RTO) and recovery point objective (RPO) in seconds.
-
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.
-
tags(Optional[TagMap], default:None) –Tags assigned to the resource. A tag is a label that you assign to an Amazon Web Services resource. Each tag consists of a key/value pair.
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.
-
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/resiliencehub.py
867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 | |