Snowball / Client / update_cluster

update_cluster#

Snowball.Client.update_cluster(**kwargs)#

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.

See also: AWS API Documentation

Request Syntax

response = client.update_cluster(
    ClusterId='string',
    RoleARN='string',
    Description='string',
    Resources={
        'S3Resources': [
            {
                'BucketArn': 'string',
                'KeyRange': {
                    'BeginMarker': 'string',
                    'EndMarker': 'string'
                },
                'TargetOnDeviceServices': [
                    {
                        'ServiceName': 'NFS_ON_DEVICE_SERVICE'|'S3_ON_DEVICE_SERVICE',
                        'TransferOption': 'IMPORT'|'EXPORT'|'LOCAL_USE'
                    },
                ]
            },
        ],
        'LambdaResources': [
            {
                'LambdaArn': 'string',
                'EventTriggers': [
                    {
                        'EventResourceARN': 'string'
                    },
                ]
            },
        ],
        'Ec2AmiResources': [
            {
                'AmiId': 'string',
                'SnowballAmiId': 'string'
            },
        ]
    },
    OnDeviceServiceConfiguration={
        'NFSOnDeviceService': {
            'StorageLimit': 123,
            'StorageUnit': 'TB'
        },
        'TGWOnDeviceService': {
            'StorageLimit': 123,
            'StorageUnit': 'TB'
        },
        'EKSOnDeviceService': {
            'KubernetesVersion': 'string',
            'EKSAnywhereVersion': 'string'
        },
        'S3OnDeviceService': {
            'StorageLimit': 123.0,
            'StorageUnit': 'TB',
            'ServiceSize': 123,
            'FaultTolerance': 123
        }
    },
    AddressId='string',
    ShippingOption='SECOND_DAY'|'NEXT_DAY'|'EXPRESS'|'STANDARD',
    Notification={
        'SnsTopicARN': 'string',
        'JobStatesToNotify': [
            'New'|'PreparingAppliance'|'PreparingShipment'|'InTransitToCustomer'|'WithCustomer'|'InTransitToAWS'|'WithAWSSortingFacility'|'WithAWS'|'InProgress'|'Complete'|'Cancelled'|'Listing'|'Pending',
        ],
        'NotifyAll': True|False,
        'DevicePickupSnsTopicARN': 'string'
    },
    ForwardingAddressId='string'
)
Parameters:
  • ClusterId (string) –

    [REQUIRED]

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

  • RoleARN (string) – 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 (string) – The updated description of this cluster.

  • Resources (dict) –

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

    • S3Resources (list) –

      An array of S3Resource objects.

      • (dict) –

        Each S3Resource object represents an Amazon S3 bucket that your transferred data will be exported from or imported into. For export jobs, this object can have an optional KeyRange value. The length of the range is defined at job creation, and has either an inclusive BeginMarker, an inclusive EndMarker, or both. Ranges are UTF-8 binary sorted.

        • BucketArn (string) –

          The Amazon Resource Name (ARN) of an Amazon S3 bucket.

        • KeyRange (dict) –

          For export jobs, you can provide an optional KeyRange within a specific Amazon S3 bucket. The length of the range is defined at job creation, and has either an inclusive BeginMarker, an inclusive EndMarker, or both. Ranges are UTF-8 binary sorted.

          • BeginMarker (string) –

            The key that starts an optional key range for an export job. Ranges are inclusive and UTF-8 binary sorted.

          • EndMarker (string) –

            The key that ends an optional key range for an export job. Ranges are inclusive and UTF-8 binary sorted.

        • TargetOnDeviceServices (list) –

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

          • (dict) –

            An object that represents 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).

            • ServiceName (string) –

              Specifies the name of the service on the Snow Family device that your transferred data will be exported from or imported into.

            • TransferOption (string) –

              Specifies whether the data is being imported or exported. You can import or export the data, or use it locally on the device.

    • LambdaResources (list) –

      The Python-language Lambda functions for this job.

      • (dict) –

        Identifies

        • LambdaArn (string) –

          An Amazon Resource Name (ARN) that represents an Lambda function to be triggered by PUT object actions on the associated local Amazon S3 resource.

        • EventTriggers (list) –

          The array of ARNs for S3Resource objects to trigger the LambdaResource objects associated with this job.

          • (dict) –

            The container for the EventTriggerDefinition$EventResourceARN.

            • EventResourceARN (string) –

              The Amazon Resource Name (ARN) for any local Amazon S3 resource that is an Lambda function’s event trigger associated with this job.

    • Ec2AmiResources (list) –

      The Amazon Machine Images (AMIs) associated with this job.

      • (dict) –

        A JSON-formatted object that contains the IDs for an Amazon Machine Image (AMI), including the Amazon EC2-compatible AMI ID and the Snow device AMI ID. Each AMI has these two IDs to simplify identifying the AMI in both the Amazon Web Services Cloud and on the device.

        • AmiId (string) – [REQUIRED]

          The ID of the AMI in Amazon EC2.

        • SnowballAmiId (string) –

          The ID of the AMI on the Snow device.

  • OnDeviceServiceConfiguration (dict) –

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

    • NFSOnDeviceService (dict) –

      Represents the NFS (Network File System) service on a Snow Family device.

      • StorageLimit (integer) –

        The maximum NFS storage for one Snow Family device.

      • StorageUnit (string) –

        The scale unit of the NFS storage on the device.

        Valid values: TB.

    • TGWOnDeviceService (dict) –

      Represents the Storage Gateway service Tape Gateway type on a Snow Family device.

      • StorageLimit (integer) –

        The maximum number of virtual tapes to store on one Snow Family device. Due to physical resource limitations, this value must be set to 80 for Snowball Edge.

      • StorageUnit (string) –

        The scale unit of the virtual tapes on the device.

    • EKSOnDeviceService (dict) –

      The configuration of EKS Anywhere on the Snow Family device.

      • KubernetesVersion (string) –

        The Kubernetes version for EKS Anywhere on the Snow Family device.

      • EKSAnywhereVersion (string) –

        The optional version of EKS Anywhere on the Snow Family device.

    • S3OnDeviceService (dict) –

      Configuration for Amazon S3 compatible storage on Snow family devices.

      • StorageLimit (float) –

        If the specified storage limit value matches storage limit of one of the defined configurations, that configuration will be used. If the specified storage limit value does not match any defined configuration, the request will fail. If more than one configuration has the same storage limit as specified, the other input need to be provided.

      • StorageUnit (string) –

        Storage unit. Currently the only supported unit is TB.

      • ServiceSize (integer) –

        Applicable when creating a cluster. Specifies how many nodes are needed for Amazon S3 compatible storage on Snow family devices. If specified, the other input can be omitted.

      • FaultTolerance (integer) –

        >Fault tolerance level of the cluster. This indicates the number of nodes that can go down without degrading the performance of the cluster. This additional input helps when the specified StorageLimit matches more than one Amazon S3 compatible storage on Snow family devices service configuration.

  • AddressId (string) – The ID of the updated Address object.

  • ShippingOption (string) – The updated shipping option value of this cluster’s ShippingDetails object.

  • Notification (dict) –

    The new or updated Notification object.

    • SnsTopicARN (string) –

      The new SNS TopicArn that you want to associate with this job. You can create Amazon Resource Names (ARNs) for topics by using the CreateTopic Amazon SNS API action.

      You can subscribe email addresses to an Amazon SNS topic through the Amazon Web Services Management Console, or by using the Subscribe Amazon Simple Notification Service (Amazon SNS) API action.

    • JobStatesToNotify (list) –

      The list of job states that will trigger a notification for this job.

      • (string) –

    • NotifyAll (boolean) –

      Any change in job state will trigger a notification for this job.

    • DevicePickupSnsTopicARN (string) –

      Used to send SNS notifications for the person picking up the device (identified during job creation).

  • ForwardingAddressId (string) – The updated ID for the forwarding address for a cluster. This field is not supported in most regions.

Return type:

dict

Returns:

Response Syntax

{}

Response Structure

  • (dict) –

Exceptions

  • Snowball.Client.exceptions.InvalidResourceException

  • Snowball.Client.exceptions.InvalidJobStateException

  • Snowball.Client.exceptions.KMSRequestFailedException

  • Snowball.Client.exceptions.InvalidInputCombinationException

  • Snowball.Client.exceptions.Ec2RequestFailedException

Examples

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.

response = client.update_cluster(
    AddressId='ADID1234ab12-3eec-4eb3-9be6-9374c10eb51b',
    ClusterId='CID123e4567-e89b-12d3-a456-426655440000',
    Description='updated-cluster-name',
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}