Skip to content

update_location_azure_blob

update_location_azure_blob(
    location_arn: LocationArn,
    *,
    config_overrides: Optional[DataSyncClientConfig] = None,
    subdirectory: Optional[AzureBlobSubdirectory] = None,
    authentication_type: Optional[AzureBlobAuthenticationType] = None,
    sas_configuration: Optional[AzureBlobSasConfiguration] = None,
    blob_type: Optional[AzureBlobType] = None,
    access_tier: Optional[AzureAccessTier] = None,
    agent_arns: Optional[AgentArnList] = None,
    cmk_secret_config: Optional[CmkSecretConfig] = None,
    custom_secret_config: Optional[CustomSecretConfig] = None,
) -> UpdateLocationAzureBlobResponse

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.

Parameters:

  • location_arn (LocationArn) –

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

  • subdirectory (Optional[AzureBlobSubdirectory], default: None ) –

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

  • authentication_type (Optional[AzureBlobAuthenticationType], default: None ) –

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

  • sas_configuration (Optional[AzureBlobSasConfiguration], default: None ) –

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

  • blob_type (Optional[AzureBlobType], default: None ) –

    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.

  • access_tier (Optional[AzureAccessTier], default: None ) –

    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.

  • agent_arns (Optional[AgentArnList], default: None ) –

    (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.

    You cannot add or remove agents from a storage location after you initially create it.

  • cmk_secret_config (Optional[CmkSecretConfig], default: None ) –

    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.

  • custom_secret_config (Optional[CustomSecretConfig], default: None ) –

    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.

Raises:

Source code in docs_src/capo_datasync/_services/data_sync.py
def update_location_azure_blob(
    self,
    location_arn: "capo_datasync.types.location_arn.LocationArn",
    *,
    config_overrides: Optional[DataSyncClientConfig] = None,
    subdirectory: Optional[
        "capo_datasync.types.azure_blob_subdirectory.AzureBlobSubdirectory"
    ] = None,
    authentication_type: Optional[
        "capo_datasync.types.azure_blob_authentication_type.AzureBlobAuthenticationType"
    ] = None,
    sas_configuration: Optional[
        "capo_datasync.types.azure_blob_sas_configuration.AzureBlobSasConfiguration"
    ] = None,
    blob_type: Optional["capo_datasync.types.azure_blob_type.AzureBlobType"] = None,
    access_tier: Optional[
        "capo_datasync.types.azure_access_tier.AzureAccessTier"
    ] = None,
    agent_arns: Optional["capo_datasync.types.agent_arn_list.AgentArnList"] = None,
    cmk_secret_config: Optional[
        "capo_datasync.types.cmk_secret_config.CmkSecretConfig"
    ] = None,
    custom_secret_config: Optional[
        "capo_datasync.types.custom_secret_config.CustomSecretConfig"
    ] = None,
) -> "capo_datasync.types.update_location_azure_blob_response.UpdateLocationAzureBlobResponse":
    """<p>Modifies the following configurations of the Microsoft Azure Blob Storage transfer location that you're using with DataSync.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/datasync/latest/userguide/creating-azure-blob-location.html">Configuring DataSync transfers with Azure Blob Storage</a>.</p>

    Args:
        location_arn: <p>Specifies the ARN of the Azure Blob Storage transfer location that you're updating.</p>
        subdirectory: <p>Specifies path segments if you want to limit your transfer to a virtual directory in your container (for example, <code>/my/images</code>).</p>
        authentication_type: <p>Specifies the authentication method DataSync uses to access your Azure Blob Storage. DataSync can access blob storage using a shared access signature (SAS).</p>
        sas_configuration: <p>Specifies the SAS configuration that allows DataSync to access your Azure Blob Storage.</p>
        blob_type: <p>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 <a href="https://learn.microsoft.com/en-us/rest/api/storageservices/understanding-block-blobs--append-blobs--and-page-blobs">Azure Blob Storage documentation</a>.</p>
        access_tier: <p>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 <a href="https://docs.aws.amazon.com/datasync/latest/userguide/creating-azure-blob-location.html#azure-blob-access-tiers">Access tiers</a>.</p>
        agent_arns: <p>(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.</p> <p>You can specify more than one agent. For more information, see <a href="https://docs.aws.amazon.com/datasync/latest/userguide/multiple-agents.html">Using multiple agents for your transfer</a>.</p> <note> <p>You cannot add or remove agents from a storage location after you initially create it.</p> </note>
        cmk_secret_config: <p>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.</p>
        custom_secret_config: <p>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.</p>

    Raises:
        capo_datasync.errors.internal_exception.InternalException: <p>This exception is thrown when an error occurs in the DataSync service.</p>
        capo_datasync.errors.invalid_request_exception.InvalidRequestException: <p>This exception is thrown when the client submits a malformed request.</p>
        capo_datasync.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_datasync.types.update_location_azure_blob_request.UpdateLocationAzureBlobRequest]",
    ) -> OperationResponse[
        "capo_datasync.types.update_location_azure_blob_response.UpdateLocationAzureBlobResponse"
    ]:
        import capo_datasync._operations.fmrs_service.update_location_azure_blob

        output, http_response = (
            capo_datasync._operations.fmrs_service.update_location_azure_blob.update_location_azure_blob(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_datasync.types.update_location_azure_blob_request.UpdateLocationAzureBlobRequest",
    ) -> dict[str, Any]:
        import capo_datasync.types.update_location_azure_blob_request

        return (
            capo_datasync.types.update_location_azure_blob_request.redact_sensitive(
                input_
            )
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("UpdateLocationAzureBlob", redact_input=_redact_input),
    )
    input_: capo_datasync.types.update_location_azure_blob_request.UpdateLocationAzureBlobRequest = {
        "location_arn": location_arn
    }
    if subdirectory is not None:
        input_["subdirectory"] = subdirectory
    if authentication_type is not None:
        input_["authentication_type"] = authentication_type
    if sas_configuration is not None:
        input_["sas_configuration"] = sas_configuration
    if blob_type is not None:
        input_["blob_type"] = blob_type
    if access_tier is not None:
        input_["access_tier"] = access_tier
    if agent_arns is not None:
        input_["agent_arns"] = agent_arns
    if cmk_secret_config is not None:
        input_["cmk_secret_config"] = cmk_secret_config
    if custom_secret_config is not None:
        input_["custom_secret_config"] = custom_secret_config

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output