Skip to content

update_mount_target

update_mount_target(
    mount_target_id: MountTargetId,
    security_groups: SecurityGroups,
    *,
    config_overrides: Optional[S3FilesClientConfig] = None,
) -> UpdateMountTargetResponse

Updates the mount target resource, specifically security group configurations.

Parameters:

  • mount_target_id (MountTargetId) –

    The ID of the mount target to update.

  • security_groups (SecurityGroups) –

    An array of VPC security group IDs to associate with the mount target's network interface. This replaces the existing security groups. All security groups must belong to the same VPC as the mount target's subnet.

Raises:

Source code in docs_src/capo_s3files/_services/s3_files.py
def update_mount_target(
    self,
    mount_target_id: "capo_s3files.types.mount_target_id.MountTargetId",
    security_groups: "capo_s3files.types.security_groups.SecurityGroups",
    *,
    config_overrides: Optional[S3FilesClientConfig] = None,
) -> "capo_s3files.types.update_mount_target_response.UpdateMountTargetResponse":
    """<p>Updates the mount target resource, specifically security group configurations.</p>

    Args:
        mount_target_id: <p>The ID of the mount target to update.</p>
        security_groups: <p>An array of VPC security group IDs to associate with the mount target's network interface. This replaces the existing security groups. All security groups must belong to the same VPC as the mount target's subnet.</p>

    Raises:
        capo_s3files.errors.throttling_exception.ThrottlingException: <p>The request was throttled. Retry your request using exponential backoff.</p>
        capo_s3files.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Retry your request.</p>
        capo_s3files.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found. Verify that the resource exists and that you have permission to access it.</p>
        capo_s3files.errors.validation_exception.ValidationException: <p>The input parameters are not valid. Check the parameter values and try again.</p>
        capo_s3files.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_s3files.types.update_mount_target_request.UpdateMountTargetRequest]",
    ) -> OperationResponse[
        "capo_s3files.types.update_mount_target_response.UpdateMountTargetResponse"
    ]:
        import capo_s3files._operations.s3_files.update_mount_target

        output, http_response = (
            capo_s3files._operations.s3_files.update_mount_target.update_mount_target(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateMountTarget")
    )
    input_: capo_s3files.types.update_mount_target_request.UpdateMountTargetRequest = {
        "mount_target_id": mount_target_id,
        "security_groups": security_groups,
    }

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