updateLocationAzureBlob method

Future<void> updateLocationAzureBlob({
  1. required String locationArn,
  2. AzureAccessTier? accessTier,
  3. List<String>? agentArns,
  4. AzureBlobAuthenticationType? authenticationType,
  5. AzureBlobType? blobType,
  6. CmkSecretConfig? cmkSecretConfig,
  7. CustomSecretConfig? customSecretConfig,
  8. AzureBlobSasConfiguration? sasConfiguration,
  9. String? subdirectory,
})

Modifies the following configurations of the Microsoft Azure Blob Storage transfer location that you're using with DataSync.

For more information, see Configuring DataSync transfers with Azure Blob Storage.

May throw InternalException. May throw InvalidRequestException.

Parameter locationArn : Specifies the ARN of the Azure Blob Storage transfer location that you're updating.

Parameter accessTier : Specifies the access tier that you want your objects or files transferred into. This only applies when using the location as a transfer destination. For more information, see Access tiers.

Parameter agentArns : (Optional) Specifies the Amazon Resource Name (ARN) of the DataSync agent that can connect with your Azure Blob Storage container. If you are setting up an agentless cross-cloud transfer, you do not need to specify a value for this parameter.

You can specify more than one agent. For more information, see Using multiple agents for your transfer.

Parameter authenticationType : Specifies the authentication method DataSync uses to access your Azure Blob Storage. DataSync can access blob storage using a shared access signature (SAS).

Parameter blobType : Specifies the type of blob that you want your objects or files to be when transferring them into Azure Blob Storage. Currently, DataSync only supports moving data into Azure Blob Storage as block blobs. For more information on blob types, see the Azure Blob Storage documentation.

Parameter cmkSecretConfig : Specifies configuration information for a DataSync-managed secret, such as an authentication token or set of credentials that DataSync uses to access a specific transfer location, and a customer-managed KMS key.

Parameter customSecretConfig : Specifies configuration information for a customer-managed secret, such as an authentication token or set of credentials that DataSync uses to access a specific transfer location, and a customer-managed Identity and Access Management (IAM) role that provides access to the secret.

Parameter sasConfiguration : Specifies the SAS configuration that allows DataSync to access your Azure Blob Storage.

Parameter subdirectory : Specifies path segments if you want to limit your transfer to a virtual directory in your container (for example, /my/images).

Implementation

Future<void> updateLocationAzureBlob({
  required String locationArn,
  AzureAccessTier? accessTier,
  List<String>? agentArns,
  AzureBlobAuthenticationType? authenticationType,
  AzureBlobType? blobType,
  CmkSecretConfig? cmkSecretConfig,
  CustomSecretConfig? customSecretConfig,
  AzureBlobSasConfiguration? sasConfiguration,
  String? subdirectory,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'FmrsService.UpdateLocationAzureBlob'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'LocationArn': locationArn,
      if (accessTier != null) 'AccessTier': accessTier.value,
      if (agentArns != null) 'AgentArns': agentArns,
      if (authenticationType != null)
        'AuthenticationType': authenticationType.value,
      if (blobType != null) 'BlobType': blobType.value,
      if (cmkSecretConfig != null) 'CmkSecretConfig': cmkSecretConfig,
      if (customSecretConfig != null)
        'CustomSecretConfig': customSecretConfig,
      if (sasConfiguration != null) 'SasConfiguration': sasConfiguration,
      if (subdirectory != null) 'Subdirectory': subdirectory,
    },
  );
}