ResilienceHubV2 / Client / import_policy
import_policy¶
- ResilienceHubV2.Client.import_policy(**kwargs)¶
Imports a V1 policy into V2, mapping RTO/RPO values from V1 scenarios.
See also: AWS API Documentation
Request Syntax
response = client.import_policy( v1PolicyArn='string', kmsKeyId='string', availabilitySlo={ 'target': 123.0 }, multiAzDisasterRecoveryApproach='ACTIVE_ACTIVE'|'HOT_STANDBY'|'WARM_STANDBY'|'PILOT_LIGHT'|'BACKUP_AND_RESTORE', multiRegionDisasterRecoveryApproach='ACTIVE_ACTIVE'|'HOT_STANDBY'|'WARM_STANDBY'|'PILOT_LIGHT'|'BACKUP_AND_RESTORE', tags={ 'string': 'string' }, clientToken='string' )
- Parameters:
v1PolicyArn (string) –
[REQUIRED]
ARN identifier.
kmsKeyId (string) – KMS key identifier — accepts key ID, key ARN, alias name, or alias ARN.
availabilitySlo (dict) –
The availability SLO to set on the imported policy.
target (float) –
The target availability percentage, expressed as a value between 0 and 100.
multiAzDisasterRecoveryApproach (string) – The multi-AZ disaster recovery approach for the imported policy.
multiRegionDisasterRecoveryApproach (string) – The multi-Region disaster recovery approach for the imported policy.
tags (dict) –
Resource tags.
(string) –
Tag key.
(string) –
Tag value.
clientToken (string) –
Idempotency token.
This field is autopopulated if not provided.
- Return type:
dict
- Returns:
Response Syntax
{ 'policy': { 'policyArn': 'string', 'name': 'string', 'description': 'string', 'availabilitySlo': { 'target': 123.0 }, 'multiAz': { 'rtoInMinutes': 123, 'rpoInMinutes': 123, 'disasterRecoveryApproach': 'ACTIVE_ACTIVE'|'HOT_STANDBY'|'WARM_STANDBY'|'PILOT_LIGHT'|'BACKUP_AND_RESTORE' }, 'multiRegion': { 'rtoInMinutes': 123, 'rpoInMinutes': 123, 'disasterRecoveryApproach': 'ACTIVE_ACTIVE'|'HOT_STANDBY'|'WARM_STANDBY'|'PILOT_LIGHT'|'BACKUP_AND_RESTORE' }, 'dataRecovery': { 'timeBetweenBackupsInMinutes': 123 }, 'kmsKeyId': 'string', 'tags': { 'string': 'string' }, 'associatedServiceCount': 123, 'createdAt': datetime(2015, 1, 1), 'updatedAt': datetime(2015, 1, 1) } }
Response Structure
(dict) –
policy (dict) –
The imported policy.
policyArn (string) –
ARN identifier.
name (string) –
Resource name (used in ARN — no spaces allowed).
description (string) –
Resource description for services and policies.
availabilitySlo (dict) –
The availability SLO defined in the policy.
target (float) –
The target availability percentage, expressed as a value between 0 and 100.
multiAz (dict) –
The multi-AZ disaster recovery targets defined in the policy.
rtoInMinutes (integer) –
The recovery time objective (RTO) target for multi-AZ, in minutes.
rpoInMinutes (integer) –
The recovery point objective (RPO) target for multi-AZ, in minutes.
disasterRecoveryApproach (string) –
The disaster recovery approach for multi-AZ.
multiRegion (dict) –
The multi-Region disaster recovery targets defined in the policy.
rtoInMinutes (integer) –
The recovery time objective (RTO) target for multi-Region, in minutes.
rpoInMinutes (integer) –
The recovery point objective (RPO) target for multi-Region, in minutes.
disasterRecoveryApproach (string) –
The disaster recovery approach for multi-Region.
dataRecovery (dict) –
The data recovery targets defined in the policy.
timeBetweenBackupsInMinutes (integer) –
The target time between backups, in minutes.
kmsKeyId (string) –
KMS key identifier — accepts key ID, key ARN, alias name, or alias ARN.
tags (dict) –
Resource tags.
(string) –
Tag key.
(string) –
Tag value.
associatedServiceCount (integer) –
The number of services associated with this policy.
createdAt (datetime) –
The timestamp when the policy was created.
updatedAt (datetime) –
The timestamp when the policy was last updated.
Exceptions
ResilienceHubV2.Client.exceptions.InternalServerExceptionResilienceHubV2.Client.exceptions.ResourceNotFoundExceptionResilienceHubV2.Client.exceptions.ValidationExceptionResilienceHubV2.Client.exceptions.ConflictExceptionResilienceHubV2.Client.exceptions.AccessDeniedException