Skip to content

update_location_efs

update_location_efs(
    location_arn: LocationArn,
    *,
    config_overrides: Optional[DataSyncClientConfig] = None,
    subdirectory: Optional[EfsSubdirectory] = None,
    access_point_arn: Optional[UpdatedEfsAccessPointArn] = None,
    file_system_access_role_arn: Optional[UpdatedEfsIamRoleArn] = None,
    in_transit_encryption: Optional[EfsInTransitEncryption] = None,
) -> UpdateLocationEfsResponse

Modifies the following configuration parameters of the Amazon EFS transfer location that you're using with DataSync.

For more information, see Configuring DataSync transfers with Amazon EFS.

Parameters:

  • location_arn (LocationArn) –

    Specifies the Amazon Resource Name (ARN) of the Amazon EFS transfer location that you're updating.

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

    Specifies a mount path for your Amazon EFS file system. This is where DataSync reads or writes data on your file system (depending on if this is a source or destination location).

    By default, DataSync uses the root directory (or access point if you provide one by using AccessPointArn). You can also include subdirectories using forward slashes (for example, /path/to/folder).

  • access_point_arn (Optional[UpdatedEfsAccessPointArn], default: None ) –

    Specifies the Amazon Resource Name (ARN) of the access point that DataSync uses to mount your Amazon EFS file system.

    For more information, see Accessing restricted Amazon EFS file systems.

  • file_system_access_role_arn (Optional[UpdatedEfsIamRoleArn], default: None ) –

    Specifies an Identity and Access Management (IAM) role that allows DataSync to access your Amazon EFS file system.

    For information on creating this role, see Creating a DataSync IAM role for Amazon EFS file system access.

  • in_transit_encryption (Optional[EfsInTransitEncryption], default: None ) –

    Specifies whether you want DataSync to use Transport Layer Security (TLS) 1.2 encryption when it transfers data to or from your Amazon EFS file system.

    If you specify an access point using AccessPointArn or an IAM role using FileSystemAccessRoleArn, you must set this parameter to TLS1_2.

Raises:

Source code in docs_src/capo_datasync/_services/data_sync.py
def update_location_efs(
    self,
    location_arn: "capo_datasync.types.location_arn.LocationArn",
    *,
    config_overrides: Optional[DataSyncClientConfig] = None,
    subdirectory: Optional[
        "capo_datasync.types.efs_subdirectory.EfsSubdirectory"
    ] = None,
    access_point_arn: Optional[
        "capo_datasync.types.updated_efs_access_point_arn.UpdatedEfsAccessPointArn"
    ] = None,
    file_system_access_role_arn: Optional[
        "capo_datasync.types.updated_efs_iam_role_arn.UpdatedEfsIamRoleArn"
    ] = None,
    in_transit_encryption: Optional[
        "capo_datasync.types.efs_in_transit_encryption.EfsInTransitEncryption"
    ] = None,
) -> "capo_datasync.types.update_location_efs_response.UpdateLocationEfsResponse":
    """<p>Modifies the following configuration parameters of the Amazon EFS transfer location that you're using with DataSync.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/datasync/latest/userguide/create-efs-location.html">Configuring DataSync transfers with Amazon EFS</a>.</p>

    Args:
        location_arn: <p>Specifies the Amazon Resource Name (ARN) of the Amazon EFS transfer location that you're updating.</p>
        subdirectory: <p>Specifies a mount path for your Amazon EFS file system. This is where DataSync reads or writes data on your file system (depending on if this is a source or destination location).</p> <p>By default, DataSync uses the root directory (or <a href="https://docs.aws.amazon.com/efs/latest/ug/efs-access-points.html">access point</a> if you provide one by using <code>AccessPointArn</code>). You can also include subdirectories using forward slashes (for example, <code>/path/to/folder</code>).</p>
        access_point_arn: <p>Specifies the Amazon Resource Name (ARN) of the access point that DataSync uses to mount your Amazon EFS file system.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/datasync/latest/userguide/create-efs-location.html#create-efs-location-iam">Accessing restricted Amazon EFS file systems</a>.</p>
        file_system_access_role_arn: <p>Specifies an Identity and Access Management (IAM) role that allows DataSync to access your Amazon EFS file system.</p> <p>For information on creating this role, see <a href="https://docs.aws.amazon.com/datasync/latest/userguide/create-efs-location.html#create-efs-location-iam-role">Creating a DataSync IAM role for Amazon EFS file system access</a>.</p>
        in_transit_encryption: <p>Specifies whether you want DataSync to use Transport Layer Security (TLS) 1.2 encryption when it transfers data to or from your Amazon EFS file system.</p> <p>If you specify an access point using <code>AccessPointArn</code> or an IAM role using <code>FileSystemAccessRoleArn</code>, you must set this parameter to <code>TLS1_2</code>.</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_efs_request.UpdateLocationEfsRequest]",
    ) -> OperationResponse[
        "capo_datasync.types.update_location_efs_response.UpdateLocationEfsResponse"
    ]:
        import capo_datasync._operations.fmrs_service.update_location_efs

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateLocationEfs")
    )
    input_: capo_datasync.types.update_location_efs_request.UpdateLocationEfsRequest = {
        "location_arn": location_arn
    }
    if subdirectory is not None:
        input_["subdirectory"] = subdirectory
    if access_point_arn is not None:
        input_["access_point_arn"] = access_point_arn
    if file_system_access_role_arn is not None:
        input_["file_system_access_role_arn"] = file_system_access_role_arn
    if in_transit_encryption is not None:
        input_["in_transit_encryption"] = in_transit_encryption

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