Skip to content

update_cluster

update_cluster(
    cluster_id: ClusterId,
    *,
    config_overrides: Optional[SnowballClientConfig] = None,
    role_arn: Optional[RoleARN] = None,
    description: Optional[String] = None,
    resources: Optional[JobResource] = None,
    on_device_service_configuration: Optional[OnDeviceServiceConfiguration] = None,
    address_id: Optional[AddressId] = None,
    shipping_option: Optional[ShippingOption] = None,
    notification: Optional[Notification] = None,
    forwarding_address_id: Optional[AddressId] = None,
) -> UpdateClusterResult

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

Parameters:

  • cluster_id (ClusterId) –

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

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

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

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

    The updated description of this cluster.

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

    The updated arrays of JobResource objects that can include updated S3Resource objects or LambdaResource objects.

  • 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 device clusters support Amazon S3 and NFS (Network File System).

  • 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 cluster's ShippingDetails object.

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

    The new or updated Notification object.

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

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

Raises:

Examples:

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

>>> client.update_cluster(cluster_id='CID123e4567-e89b-12d3-a456-426655440000', description='updated-cluster-name', address_id='ADID1234ab12-3eec-4eb3-9be6-9374c10eb51b')
Source code in docs_src/capo_snowball/_services/snowball.py
def update_cluster(
    self,
    cluster_id: "capo_snowball.types.cluster_id.ClusterId",
    *,
    config_overrides: Optional[SnowballClientConfig] = None,
    role_arn: Optional["capo_snowball.types.role_arn.RoleARN"] = None,
    description: Optional["capo_snowball.types.string.String"] = 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,
    notification: Optional["capo_snowball.types.notification.Notification"] = None,
    forwarding_address_id: Optional[
        "capo_snowball.types.address_id.AddressId"
    ] = None,
) -> "capo_snowball.types.update_cluster_result.UpdateClusterResult":
    """<p>While a cluster's <code>ClusterState</code> value is in the <code>AwaitingQuorum</code> state, you can update some of the information associated with a cluster. Once the cluster changes to a different job state, usually 60 minutes after the cluster being created, this action is no longer available.</p>

    Args:
        cluster_id: <p>The cluster ID of the cluster that you want to update, for example <code>CID123e4567-e89b-12d3-a456-426655440000</code>.</p>
        role_arn: <p>The new role Amazon Resource Name (ARN) that you want to associate with this cluster. To create a role ARN, use the <a href="https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateRole.html">CreateRole</a> API action in Identity and Access Management (IAM).</p>
        description: <p>The updated description of this cluster.</p>
        resources: <p>The updated arrays of <a>JobResource</a> objects that can include updated <a>S3Resource</a> objects or <a>LambdaResource</a> objects.</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 device clusters support Amazon S3 and NFS (Network File System).</p>
        address_id: <p>The ID of the updated <a>Address</a> object.</p>
        shipping_option: <p>The updated shipping option value of this cluster's <a>ShippingDetails</a> object.</p>
        notification: <p>The new or updated <a>Notification</a> object.</p>
        forwarding_address_id: <p>The updated ID for the forwarding address for a cluster. This field is not supported in most regions.</p>

    Raises:
        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 cluster
        This action allows you to update certain parameters for a cluster. Once the cluster changes to a different state, usually within 60 minutes of it being created, this action is no longer available.

        >>> client.update_cluster(cluster_id='CID123e4567-e89b-12d3-a456-426655440000', description='updated-cluster-name', address_id='ADID1234ab12-3eec-4eb3-9be6-9374c10eb51b')
    """

    def _handler(
        req: "OperationRequest[capo_snowball.types.update_cluster_request.UpdateClusterRequest]",
    ) -> OperationResponse[
        "capo_snowball.types.update_cluster_result.UpdateClusterResult"
    ]:
        import capo_snowball._operations.awsie_snowball_job_management_service.update_cluster

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateCluster")
    )
    input_: capo_snowball.types.update_cluster_request.UpdateClusterRequest = {
        "cluster_id": cluster_id
    }
    if role_arn is not None:
        input_["role_arn"] = role_arn
    if description is not None:
        input_["description"] = description
    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 notification is not None:
        input_["notification"] = notification
    if forwarding_address_id is not None:
        input_["forwarding_address_id"] = forwarding_address_id

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