createTieringConfiguration method

Future<CreateTieringConfigurationOutput> createTieringConfiguration({
  1. required TieringConfigurationInputForCreate tieringConfiguration,
  2. String? creatorRequestId,
  3. Map<String, String>? tieringConfigurationTags,
})

Creates a tiering configuration.

A tiering configuration enables automatic movement of backup data to a lower-cost storage tier based on the age of backed-up objects in the backup vault.

Each vault can only have one vault-specific tiering configuration, in addition to any global configuration that applies to all vaults.

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

Parameter tieringConfiguration : A tiering configuration must contain a unique TieringConfigurationName string you create and must contain a BackupVaultName and ResourceSelection. You may optionally include a CreatorRequestId string.

The TieringConfigurationName is a unique string that is the name of the tiering configuration. This cannot be changed after creation, and it must consist of only alphanumeric characters and underscores.

Parameter creatorRequestId : This is a unique string that identifies the request and allows failed requests to be retried without the risk of running the operation twice. This parameter is optional. If used, this parameter must contain 1 to 50 alphanumeric or '-_.' characters.

Parameter tieringConfigurationTags : The tags to assign to the tiering configuration.

Implementation

Future<CreateTieringConfigurationOutput> createTieringConfiguration({
  required TieringConfigurationInputForCreate tieringConfiguration,
  String? creatorRequestId,
  Map<String, String>? tieringConfigurationTags,
}) async {
  final $payload = <String, dynamic>{
    'TieringConfiguration': tieringConfiguration,
    'CreatorRequestId': creatorRequestId ?? _s.generateIdempotencyToken(),
    if (tieringConfigurationTags != null)
      'TieringConfigurationTags': tieringConfigurationTags,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri: '/tiering-configurations',
    exceptionFnMap: _exceptionFns,
  );
  return CreateTieringConfigurationOutput.fromJson(response);
}