createBackupAccessPoint method

Future<CreateBackupAccessPointResponse> createBackupAccessPoint({
  1. required String name,
  2. required String recoveryPointArn,
  3. Map<String, String>? accessPointMetadata,
  4. String? accessPointPolicy,
  5. Map<String, String>? tags,
})

Creates a backup access point for an Amazon S3 recovery point. A backup access point provides on-demand, read-only access to the backup data in a recovery point through an Amazon S3 access point, without initiating a restore.

While a backup access point is active for a recovery point, Backup pauses lifecycle transitions and blocks deletion of that recovery point.

May throw AlreadyExistsException. May throw ConflictException. May throw InvalidParameterValueException. May throw InvalidRequestException. May throw LimitExceededException. May throw MissingParameterValueException. May throw ResourceNotFoundException. May throw ServiceUnavailableException.

Parameter name : The name of the backup access point. This name is shared with the Amazon S3 access point namespace. It must be unique within your account and Region and cannot conflict with an existing Amazon S3 access point. For more information about access point naming, see Access points naming rules, restrictions, and limitations in the Amazon S3 User Guide.

Parameter recoveryPointArn : The Amazon Resource Name (ARN) of the recovery point for which to create the backup access point. The recovery point must be an Amazon S3 recovery point in the AVAILABLE, STOPPED, or COMPLETED state.

Parameter accessPointMetadata : Metadata for the backup access point. For continuous (point-in-time) recovery points, you must include an AccessPointInTime timestamp (in format 2021-11-27T03:30:27Z). The access point provides access to the content present in the backup at that specific time. You can specify any time within the continuous backup's retention period, up to the latest restorable time. For snapshot recovery points, do not include AccessPointInTime.

Parameter accessPointPolicy : An optional resource-based policy, in JSON format, to apply to the underlying Amazon S3 access point. The policy controls how backup data can be accessed through the access point. If you do not specify a policy, access is governed by the caller's IAM permissions. For more information, see Configuring IAM policies for using access points in the Amazon S3 User Guide.

Parameter tags : The tags to assign to the backup access point.

Implementation

Future<CreateBackupAccessPointResponse> createBackupAccessPoint({
  required String name,
  required String recoveryPointArn,
  Map<String, String>? accessPointMetadata,
  String? accessPointPolicy,
  Map<String, String>? tags,
}) async {
  final $payload = <String, dynamic>{
    'Name': name,
    'RecoveryPointArn': recoveryPointArn,
    if (accessPointMetadata != null)
      'AccessPointMetadata': accessPointMetadata,
    if (accessPointPolicy != null) 'AccessPointPolicy': accessPointPolicy,
    if (tags != null) 'Tags': tags,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri: '/backup-access-point/create',
    exceptionFnMap: _exceptionFns,
  );
  return CreateBackupAccessPointResponse.fromJson(response);
}