Amazon Elastic Container Service for Kubernetes

2018/12/12 - Amazon Elastic Container Service for Kubernetes - 3 new api methods

Changes  Added support for updating kubernetes version of Amazon EKS clusters.

UpdateClusterVersion (new) Link ¶

Updates an Amazon EKS cluster to the specified Kubernetes version. Your cluster continues to function during the update. The response output includes an update ID that you can use to track the status of your cluster update with the DescribeUpdate API operation.

Cluster updates are asynchronous, and they should finish within a few minutes. During an update, the cluster status moves to UPDATING (this status transition is eventually consistent). When the update is complete (either Failed or Successful ), the cluster status moves to Active .

See also: AWS API Documentation

Request Syntax

client.update_cluster_version(
    name='string',
    version='string',
    clientRequestToken='string'
)
type name

string

param name

[REQUIRED]

The name of the Amazon EKS cluster to update.

type version

string

param version

[REQUIRED]

The desired Kubernetes version following a successful update.

type clientRequestToken

string

param clientRequestToken

Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

This field is autopopulated if not provided.

rtype

dict

returns

Response Syntax

{
    'update': {
        'id': 'string',
        'status': 'InProgress'|'Failed'|'Cancelled'|'Successful',
        'type': 'VersionUpdate',
        'params': [
            {
                'type': 'Version'|'PlatformVersion',
                'value': 'string'
            },
        ],
        'createdAt': datetime(2015, 1, 1),
        'errors': [
            {
                'errorCode': 'SubnetNotFound'|'SecurityGroupNotFound'|'EniLimitReached'|'IpNotAvailable'|'AccessDenied'|'OperationNotPermitted'|'VpcIdNotFound'|'Unknown',
                'errorMessage': 'string',
                'resourceIds': [
                    'string',
                ]
            },
        ]
    }
}

Response Structure

  • (dict) --

    • update (dict) --

      The full description of the specified update

      • id (string) --

        A UUID that is used to track the update.

      • status (string) --

        The current status of the update.

      • type (string) --

        The type of the update.

      • params (list) --

        A key-value map that contains the parameters associated with the update.

        • (dict) --

          An object representing the details of an update request.

          • type (string) --

            The keys associated with an update request.

          • value (string) --

            The value of the keys submitted as part of an update request.

      • createdAt (datetime) --

        The Unix epoch timestamp in seconds for when the update was created.

      • errors (list) --

        Any errors associated with a Failed update.

        • (dict) --

          An object representing an error when an asynchronous operation fails.

          • errorCode (string) --

            A brief description of the error.

            • SubnetNotFound : One of the subnets associated with the cluster could not be found.

            • SecurityGroupNotFound : One of the security groups associated with the cluster could not be found.

            • EniLimitReached : You have reached the elastic network interface limit for your account.

            • IpNotAvailable : A subnet associated with the cluster does not have any free IP addresses.

            • AccessDenied : You do not have permissions to perform the specified operation.

            • OperationNotPermitted : The service role associated with the cluster does not have the required access permissions for Amazon EKS.

            • VpcIdNotFound : The VPC associated with the cluster could not be found.

          • errorMessage (string) --

            A more complete description of the error.

          • resourceIds (list) --

            An optional field that contains the resource IDs associated with the error.

            • (string) --

ListUpdates (new) Link ¶

Lists the updates associated with an Amazon EKS cluster in your AWS account, in the specified Region.

See also: AWS API Documentation

Request Syntax

client.list_updates(
    name='string',
    nextToken='string',
    maxResults=123
)
type name

string

param name

[REQUIRED]

The name of the Amazon EKS cluster for which to list updates.

type nextToken

string

param nextToken

The nextToken value returned from a previous paginated ListUpdates request where maxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the nextToken value.

type maxResults

integer

param maxResults

The maximum number of update results returned by ListUpdates in paginated output. When this parameter is used, ListUpdates only returns maxResults results in a single page along with a nextToken response element. The remaining results of the initial request can be seen by sending another ListUpdates request with the returned nextToken value. This value can be between 1 and 100. If this parameter is not used, then ListUpdates returns up to 100 results and a nextToken value if applicable.

rtype

dict

returns

Response Syntax

{
    'updateIds': [
        'string',
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • updateIds (list) --

      A list of all the updates for the specified cluster and Region.

      • (string) --

    • nextToken (string) --

      The nextToken value to include in a future ListUpdates request. When the results of a ListUpdates request exceed maxResults , this value can be used to retrieve the next page of results. This value is null when there are no more results to return.

DescribeUpdate (new) Link ¶

Returns descriptive information about an update against your Amazon EKS cluster.

When the status of the update is Succeeded , the update is complete. If an update fails, the status is Failed , and an error detail explains the reason for the failure.

See also: AWS API Documentation

Request Syntax

client.describe_update(
    name='string',
    updateId='string'
)
type name

string

param name

[REQUIRED]

The name of the Amazon EKS cluster to update.

type updateId

string

param updateId

[REQUIRED]

The ID of the update to describe.

rtype

dict

returns

Response Syntax

{
    'update': {
        'id': 'string',
        'status': 'InProgress'|'Failed'|'Cancelled'|'Successful',
        'type': 'VersionUpdate',
        'params': [
            {
                'type': 'Version'|'PlatformVersion',
                'value': 'string'
            },
        ],
        'createdAt': datetime(2015, 1, 1),
        'errors': [
            {
                'errorCode': 'SubnetNotFound'|'SecurityGroupNotFound'|'EniLimitReached'|'IpNotAvailable'|'AccessDenied'|'OperationNotPermitted'|'VpcIdNotFound'|'Unknown',
                'errorMessage': 'string',
                'resourceIds': [
                    'string',
                ]
            },
        ]
    }
}

Response Structure

  • (dict) --

    • update (dict) --

      The full description of the specified update.

      • id (string) --

        A UUID that is used to track the update.

      • status (string) --

        The current status of the update.

      • type (string) --

        The type of the update.

      • params (list) --

        A key-value map that contains the parameters associated with the update.

        • (dict) --

          An object representing the details of an update request.

          • type (string) --

            The keys associated with an update request.

          • value (string) --

            The value of the keys submitted as part of an update request.

      • createdAt (datetime) --

        The Unix epoch timestamp in seconds for when the update was created.

      • errors (list) --

        Any errors associated with a Failed update.

        • (dict) --

          An object representing an error when an asynchronous operation fails.

          • errorCode (string) --

            A brief description of the error.

            • SubnetNotFound : One of the subnets associated with the cluster could not be found.

            • SecurityGroupNotFound : One of the security groups associated with the cluster could not be found.

            • EniLimitReached : You have reached the elastic network interface limit for your account.

            • IpNotAvailable : A subnet associated with the cluster does not have any free IP addresses.

            • AccessDenied : You do not have permissions to perform the specified operation.

            • OperationNotPermitted : The service role associated with the cluster does not have the required access permissions for Amazon EKS.

            • VpcIdNotFound : The VPC associated with the cluster could not be found.

          • errorMessage (string) --

            A more complete description of the error.

          • resourceIds (list) --

            An optional field that contains the resource IDs associated with the error.

            • (string) --