Skip to content

update_job

update_job(
    job_id: JobId,
    *,
    config_overrides: Optional[SnowballClientConfig] = None,
    role_arn: Optional[RoleARN] = None,
    notification: Optional[Notification] = None,
    resources: Optional[JobResource] = None,
    on_device_service_configuration: Optional[OnDeviceServiceConfiguration] = None,
    address_id: Optional[AddressId] = None,
    shipping_option: Optional[ShippingOption] = None,
    description: Optional[String] = None,
    snowball_capacity_preference: Optional[SnowballCapacity] = None,
    forwarding_address_id: Optional[AddressId] = None,
    pickup_details: Optional[PickupDetails] = None,
) -> UpdateJobResult

While a job's JobState value is New, you can update some of the information associated with a job. Once the job changes to a different job state, usually within 60 minutes of the job being created, this action is no longer available.

Parameters:

  • job_id (JobId) –

    The job ID of the job that you want to update, for example JID123e4567-e89b-12d3-a456-426655440000.

  • role_arn (Optional[RoleARN], default: None ) –

    The new role Amazon Resource Name (ARN) that you want to associate with this job. To create a role ARN, use the CreateRoleIdentity and Access Management (IAM) API action.

  • notification (Optional[Notification], default: None ) –

    The new or updated Notification object.

  • resources (Optional[JobResource], default: None ) –

    The updated JobResource object, or the updated JobResource object.

  • on_device_service_configuration (Optional[OnDeviceServiceConfiguration], default: None ) –

    Specifies the service or services on the Snow Family device that your transferred data will be exported from or imported into. Amazon Web Services Snow Family supports Amazon S3 and NFS (Network File System) and the Amazon Web Services Storage Gateway service Tape Gateway type.

  • address_id (Optional[AddressId], default: None ) –

    The ID of the updated Address object.

  • shipping_option (Optional[ShippingOption], default: None ) –

    The updated shipping option value of this job's ShippingDetails object.

  • description (Optional[String], default: None ) –

    The updated description of this job's JobMetadata object.

  • snowball_capacity_preference (Optional[SnowballCapacity], default: None ) –

    The updated SnowballCapacityPreference of this job's JobMetadata object. The 50 TB Snowballs are only available in the US regions.

    For more information, see "https://docs.aws.amazon.com/snowball/latest/snowcone-guide/snow-device-types.html" (Snow Family Devices and Capacity) in the Snowcone User Guide or "https://docs.aws.amazon.com/snowball/latest/developer-guide/snow-device-types.html" (Snow Family Devices and Capacity) in the Snowcone User Guide.

  • forwarding_address_id (Optional[AddressId], default: None ) –

    The updated ID for the forwarding address for a job. This field is not supported in most regions.

Raises:

Examples:

To update a job This action allows you to update certain parameters for a job. Once the job changes to a different job state, usually within 60 minutes of the job being created, this action is no longer available.

>>> client.update_job(job_id='JID123e4567-e89b-12d3-a456-426655440000', address_id='ADID1234ab12-3eec-4eb3-9be6-9374c10eb51b', shipping_option='NEXT_DAY', description='updated-job-name', snowball_capacity_preference='T100')
Source code in docs_src/capo_snowball/_services/snowball.py
def update_job(
    self,
    job_id: "capo_snowball.types.job_id.JobId",
    *,
    config_overrides: Optional[SnowballClientConfig] = None,
    role_arn: Optional["capo_snowball.types.role_arn.RoleARN"] = None,
    notification: Optional["capo_snowball.types.notification.Notification"] = None,
    resources: Optional["capo_snowball.types.job_resource.JobResource"] = None,
    on_device_service_configuration: Optional[
        "capo_snowball.types.on_device_service_configuration.OnDeviceServiceConfiguration"
    ] = None,
    address_id: Optional["capo_snowball.types.address_id.AddressId"] = None,
    shipping_option: Optional[
        "capo_snowball.types.shipping_option.ShippingOption"
    ] = None,
    description: Optional["capo_snowball.types.string.String"] = None,
    snowball_capacity_preference: Optional[
        "capo_snowball.types.snowball_capacity.SnowballCapacity"
    ] = None,
    forwarding_address_id: Optional[
        "capo_snowball.types.address_id.AddressId"
    ] = None,
    pickup_details: Optional[
        "capo_snowball.types.pickup_details.PickupDetails"
    ] = None,
) -> "capo_snowball.types.update_job_result.UpdateJobResult":
    """<p>While a job's <code>JobState</code> value is <code>New</code>, you can update some of the information associated with a job. Once the job changes to a different job state, usually within 60 minutes of the job being created, this action is no longer available.</p>

    Args:
        job_id: <p>The job ID of the job that you want to update, for example <code>JID123e4567-e89b-12d3-a456-426655440000</code>.</p>
        role_arn: <p>The new role Amazon Resource Name (ARN) that you want to associate with this job. To create a role ARN, use the <a href="https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateRole.html">CreateRole</a>Identity and Access Management (IAM) API action.</p>
        notification: <p>The new or updated <a>Notification</a> object.</p>
        resources: <p>The updated <code>JobResource</code> object, or the updated <a>JobResource</a> object. </p>
        on_device_service_configuration: <p>Specifies the service or services on the Snow Family device that your transferred data will be exported from or imported into. Amazon Web Services Snow Family supports Amazon S3 and NFS (Network File System) and the Amazon Web Services Storage Gateway service Tape Gateway type.</p>
        address_id: <p>The ID of the updated <a>Address</a> object.</p>
        shipping_option: <p>The updated shipping option value of this job's <a>ShippingDetails</a> object.</p>
        description: <p>The updated description of this job's <a>JobMetadata</a> object.</p>
        snowball_capacity_preference: <p>The updated <code>SnowballCapacityPreference</code> of this job's <a>JobMetadata</a> object. The 50 TB Snowballs are only available in the US regions.</p> <p>For more information, see "https://docs.aws.amazon.com/snowball/latest/snowcone-guide/snow-device-types.html" (Snow Family Devices and Capacity) in the <i>Snowcone User Guide</i> or "https://docs.aws.amazon.com/snowball/latest/developer-guide/snow-device-types.html" (Snow Family Devices and Capacity) in the <i>Snowcone User Guide</i>.</p>
        forwarding_address_id: <p>The updated ID for the forwarding address for a job. This field is not supported in most regions.</p>

    Raises:
        capo_snowball.errors.cluster_limit_exceeded_exception.ClusterLimitExceededException: <p>Job creation failed. Currently, clusters support five nodes. If you have fewer than five nodes for your cluster and you have more nodes to create for this cluster, try again and create jobs until your cluster has exactly five nodes.</p>
        capo_snowball.errors.ec2_request_failed_exception.Ec2RequestFailedException: <p>Your user lacks the necessary Amazon EC2 permissions to perform the attempted action.</p>
        capo_snowball.errors.invalid_input_combination_exception.InvalidInputCombinationException: <p>Job or cluster creation failed. One or more inputs were invalid. Confirm that the <a>CreateClusterRequest$SnowballType</a> value supports your <a>CreateJobRequest$JobType</a>, and try again.</p>
        capo_snowball.errors.invalid_job_state_exception.InvalidJobStateException: <p>The action can't be performed because the job's current state doesn't allow that action to be performed.</p>
        capo_snowball.errors.invalid_resource_exception.InvalidResourceException: <p>The specified resource can't be found. Check the information you provided in your last request, and try again.</p>
        capo_snowball.errors.kms_request_failed_exception.KMSRequestFailedException: <p>The provided Key Management Service key lacks the permissions to perform the specified <a>CreateJob</a> or <a>UpdateJob</a> action.</p>
        capo_snowball.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        To update a job
        This action allows you to update certain parameters for a job. Once the job changes to a different job state, usually within 60 minutes of the job being created, this action is no longer available.

        >>> client.update_job(job_id='JID123e4567-e89b-12d3-a456-426655440000', address_id='ADID1234ab12-3eec-4eb3-9be6-9374c10eb51b', shipping_option='NEXT_DAY', description='updated-job-name', snowball_capacity_preference='T100')
    """

    def _handler(
        req: "OperationRequest[capo_snowball.types.update_job_request.UpdateJobRequest]",
    ) -> OperationResponse["capo_snowball.types.update_job_result.UpdateJobResult"]:
        import capo_snowball._operations.awsie_snowball_job_management_service.update_job

        output, http_response = (
            capo_snowball._operations.awsie_snowball_job_management_service.update_job.update_job(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_snowball.types.update_job_request.UpdateJobRequest",
    ) -> dict[str, Any]:
        import capo_snowball.types.update_job_request

        return capo_snowball.types.update_job_request.redact_sensitive(input_)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateJob", redact_input=_redact_input)
    )
    input_: capo_snowball.types.update_job_request.UpdateJobRequest = {
        "job_id": job_id
    }
    if role_arn is not None:
        input_["role_arn"] = role_arn
    if notification is not None:
        input_["notification"] = notification
    if resources is not None:
        input_["resources"] = resources
    if on_device_service_configuration is not None:
        input_["on_device_service_configuration"] = on_device_service_configuration
    if address_id is not None:
        input_["address_id"] = address_id
    if shipping_option is not None:
        input_["shipping_option"] = shipping_option
    if description is not None:
        input_["description"] = description
    if snowball_capacity_preference is not None:
        input_["snowball_capacity_preference"] = snowball_capacity_preference
    if forwarding_address_id is not None:
        input_["forwarding_address_id"] = forwarding_address_id
    if pickup_details is not None:
        input_["pickup_details"] = pickup_details

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