Struct aws_sdk_eks::Client

source ·
pub struct Client { /* private fields */ }
Expand description

Client for Amazon Elastic Kubernetes Service

Client for invoking operations on Amazon Elastic Kubernetes Service. Each operation on Amazon Elastic Kubernetes Service is a method on this this struct. .send() MUST be invoked on the generated operations to dispatch the request to the service.

Constructing a Client

A Config is required to construct a client. For most use cases, the aws-config crate should be used to automatically resolve this config using aws_config::load_from_env(), since this will resolve an SdkConfig which can be shared across multiple different AWS SDK clients. This config resolution process can be customized by calling aws_config::from_env() instead, which returns a ConfigLoader that uses the builder pattern to customize the default config.

In the simplest case, creating a client looks as follows:

let config = aws_config::load_from_env().await;
let client = aws_sdk_eks::Client::new(&config);

Occasionally, SDKs may have additional service-specific that can be set on the Config that is absent from SdkConfig, or slightly different settings for a specific client may be desired. The Config struct implements From<&SdkConfig>, so setting these specific settings can be done as follows:

let sdk_config = ::aws_config::load_from_env().await;
let config = aws_sdk_eks::config::Builder::from(&sdk_config)
    .some_service_specific_setting("value")
    .build();

See the aws-config docs and Config for more information on customizing configuration.

Note: Client construction is expensive due to connection thread pool initialization, and should be done once at application start-up.

Using the Client

A client has a function for every operation that can be performed by the service. For example, the AssociateEncryptionConfig operation has a Client::associate_encryption_config, function which returns a builder for that operation. The fluent builder ultimately has a send() function that returns an async future that returns a result, as illustrated below:

let result = client.associate_encryption_config()
    .cluster_name("example")
    .send()
    .await;

The underlying HTTP requests that get made by this can be modified with the customize_operation function on the fluent builder. See the customize module for more information.

Implementations§

source§

impl Client

source

pub fn associate_encryption_config( &self ) -> AssociateEncryptionConfigFluentBuilder

Constructs a fluent builder for the AssociateEncryptionConfig operation.

source§

impl Client

source

pub fn associate_identity_provider_config( &self ) -> AssociateIdentityProviderConfigFluentBuilder

Constructs a fluent builder for the AssociateIdentityProviderConfig operation.

source§

impl Client

source

pub fn create_addon(&self) -> CreateAddonFluentBuilder

Constructs a fluent builder for the CreateAddon operation.

source§

impl Client

source

pub fn create_cluster(&self) -> CreateClusterFluentBuilder

Constructs a fluent builder for the CreateCluster operation.

source§

impl Client

source

pub fn create_eks_anywhere_subscription( &self ) -> CreateEksAnywhereSubscriptionFluentBuilder

Constructs a fluent builder for the CreateEksAnywhereSubscription operation.

source§

impl Client

source

pub fn create_fargate_profile(&self) -> CreateFargateProfileFluentBuilder

Constructs a fluent builder for the CreateFargateProfile operation.

source§

impl Client

source

pub fn create_nodegroup(&self) -> CreateNodegroupFluentBuilder

Constructs a fluent builder for the CreateNodegroup operation.

source§

impl Client

source

pub fn create_pod_identity_association( &self ) -> CreatePodIdentityAssociationFluentBuilder

Constructs a fluent builder for the CreatePodIdentityAssociation operation.

source§

impl Client

source

pub fn delete_addon(&self) -> DeleteAddonFluentBuilder

Constructs a fluent builder for the DeleteAddon operation.

source§

impl Client

source

pub fn delete_cluster(&self) -> DeleteClusterFluentBuilder

Constructs a fluent builder for the DeleteCluster operation.

source§

impl Client

source

pub fn delete_eks_anywhere_subscription( &self ) -> DeleteEksAnywhereSubscriptionFluentBuilder

Constructs a fluent builder for the DeleteEksAnywhereSubscription operation.

source§

impl Client

source

pub fn delete_fargate_profile(&self) -> DeleteFargateProfileFluentBuilder

Constructs a fluent builder for the DeleteFargateProfile operation.

source§

impl Client

source

pub fn delete_nodegroup(&self) -> DeleteNodegroupFluentBuilder

Constructs a fluent builder for the DeleteNodegroup operation.

source§

impl Client

source

pub fn delete_pod_identity_association( &self ) -> DeletePodIdentityAssociationFluentBuilder

Constructs a fluent builder for the DeletePodIdentityAssociation operation.

source§

impl Client

source

pub fn deregister_cluster(&self) -> DeregisterClusterFluentBuilder

Constructs a fluent builder for the DeregisterCluster operation.

source§

impl Client

source

pub fn describe_addon(&self) -> DescribeAddonFluentBuilder

Constructs a fluent builder for the DescribeAddon operation.

source§

impl Client

source

pub fn describe_addon_configuration( &self ) -> DescribeAddonConfigurationFluentBuilder

Constructs a fluent builder for the DescribeAddonConfiguration operation.

source§

impl Client

source

pub fn describe_addon_versions(&self) -> DescribeAddonVersionsFluentBuilder

Constructs a fluent builder for the DescribeAddonVersions operation. This operation supports pagination; See into_paginator().

source§

impl Client

source

pub fn describe_cluster(&self) -> DescribeClusterFluentBuilder

Constructs a fluent builder for the DescribeCluster operation.

source§

impl Client

source

pub fn describe_eks_anywhere_subscription( &self ) -> DescribeEksAnywhereSubscriptionFluentBuilder

Constructs a fluent builder for the DescribeEksAnywhereSubscription operation.

source§

impl Client

source

pub fn describe_fargate_profile(&self) -> DescribeFargateProfileFluentBuilder

Constructs a fluent builder for the DescribeFargateProfile operation.

source§

impl Client

source

pub fn describe_identity_provider_config( &self ) -> DescribeIdentityProviderConfigFluentBuilder

Constructs a fluent builder for the DescribeIdentityProviderConfig operation.

source§

impl Client

source

pub fn describe_nodegroup(&self) -> DescribeNodegroupFluentBuilder

Constructs a fluent builder for the DescribeNodegroup operation.

source§

impl Client

source

pub fn describe_pod_identity_association( &self ) -> DescribePodIdentityAssociationFluentBuilder

Constructs a fluent builder for the DescribePodIdentityAssociation operation.

source§

impl Client

source

pub fn describe_update(&self) -> DescribeUpdateFluentBuilder

Constructs a fluent builder for the DescribeUpdate operation.

source§

impl Client

source

pub fn disassociate_identity_provider_config( &self ) -> DisassociateIdentityProviderConfigFluentBuilder

Constructs a fluent builder for the DisassociateIdentityProviderConfig operation.

source§

impl Client

source

pub fn list_addons(&self) -> ListAddonsFluentBuilder

Constructs a fluent builder for the ListAddons operation. This operation supports pagination; See into_paginator().

  • The fluent builder is configurable:
    • cluster_name(impl Into<String>) / set_cluster_name(Option<String>):
      required: true

      The name of the cluster.


    • max_results(i32) / set_max_results(Option<i32>):
      required: false

      The maximum number of add-on results returned by ListAddonsRequest in paginated output. When you use this parameter, ListAddonsRequest returns only maxResults results in a single page along with a nextToken response element. You can see the remaining results of the initial request by sending another ListAddonsRequest request with the returned nextToken value. This value can be between 1 and 100. If you don’t use this parameter, ListAddonsRequest returns up to 100 results and a nextToken value, if applicable.


    • next_token(impl Into<String>) / set_next_token(Option<String>):
      required: false

      The nextToken value returned from a previous paginated ListAddonsRequest 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.

      This token should be treated as an opaque identifier that is used only to retrieve the next items in a list and not for other programmatic purposes.


  • On success, responds with ListAddonsOutput with field(s):
    • addons(Option<Vec::<String>>):

      A list of installed add-ons.

    • next_token(Option<String>):

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

      This token should be treated as an opaque identifier that is used only to retrieve the next items in a list and not for other programmatic purposes.

  • On failure, responds with SdkError<ListAddonsError>
source§

impl Client

source

pub fn list_clusters(&self) -> ListClustersFluentBuilder

Constructs a fluent builder for the ListClusters operation. This operation supports pagination; See into_paginator().

  • The fluent builder is configurable:
    • max_results(i32) / set_max_results(Option<i32>):
      required: false

      The maximum number of cluster results returned by ListClusters in paginated output. When you use this parameter, ListClusters returns only maxResults results in a single page along with a nextToken response element. You can see the remaining results of the initial request by sending another ListClusters request with the returned nextToken value. This value can be between 1 and 100. If you don’t use this parameter, ListClusters returns up to 100 results and a nextToken value if applicable.


    • next_token(impl Into<String>) / set_next_token(Option<String>):
      required: false

      The nextToken value returned from a previous paginated ListClusters 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.

      This token should be treated as an opaque identifier that is used only to retrieve the next items in a list and not for other programmatic purposes.


    • include(impl Into<String>) / set_include(Option<Vec::<String>>):
      required: false

      Indicates whether external clusters are included in the returned list. Use ‘all’ to return connected clusters, or blank to return only Amazon EKS clusters. ‘all’ must be in lowercase otherwise an error occurs.


  • On success, responds with ListClustersOutput with field(s):
    • clusters(Option<Vec::<String>>):

      A list of all of the clusters for your account in the specified Region.

    • next_token(Option<String>):

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

  • On failure, responds with SdkError<ListClustersError>
source§

impl Client

source

pub fn list_eks_anywhere_subscriptions( &self ) -> ListEksAnywhereSubscriptionsFluentBuilder

Constructs a fluent builder for the ListEksAnywhereSubscriptions operation. This operation supports pagination; See into_paginator().

source§

impl Client

source

pub fn list_fargate_profiles(&self) -> ListFargateProfilesFluentBuilder

Constructs a fluent builder for the ListFargateProfiles operation. This operation supports pagination; See into_paginator().

  • The fluent builder is configurable:
    • cluster_name(impl Into<String>) / set_cluster_name(Option<String>):
      required: true

      The name of the Amazon EKS cluster that you would like to list Fargate profiles in.


    • max_results(i32) / set_max_results(Option<i32>):
      required: false

      The maximum number of Fargate profile results returned by ListFargateProfiles in paginated output. When you use this parameter, ListFargateProfiles returns only maxResults results in a single page along with a nextToken response element. You can see the remaining results of the initial request by sending another ListFargateProfiles request with the returned nextToken value. This value can be between 1 and 100. If you don’t use this parameter, ListFargateProfiles returns up to 100 results and a nextToken value if applicable.


    • next_token(impl Into<String>) / set_next_token(Option<String>):
      required: false

      The nextToken value returned from a previous paginated ListFargateProfiles 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.


  • On success, responds with ListFargateProfilesOutput with field(s):
    • fargate_profile_names(Option<Vec::<String>>):

      A list of all of the Fargate profiles associated with the specified cluster.

    • next_token(Option<String>):

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

  • On failure, responds with SdkError<ListFargateProfilesError>
source§

impl Client

source

pub fn list_identity_provider_configs( &self ) -> ListIdentityProviderConfigsFluentBuilder

Constructs a fluent builder for the ListIdentityProviderConfigs operation. This operation supports pagination; See into_paginator().

  • The fluent builder is configurable:
    • cluster_name(impl Into<String>) / set_cluster_name(Option<String>):
      required: true

      The cluster name that you want to list identity provider configurations for.


    • max_results(i32) / set_max_results(Option<i32>):
      required: false

      The maximum number of identity provider configurations returned by ListIdentityProviderConfigs in paginated output. When you use this parameter, ListIdentityProviderConfigs returns only maxResults results in a single page along with a nextToken response element. You can see the remaining results of the initial request by sending another ListIdentityProviderConfigs request with the returned nextToken value. This value can be between 1 and 100. If you don’t use this parameter, ListIdentityProviderConfigs returns up to 100 results and a nextToken value, if applicable.


    • next_token(impl Into<String>) / set_next_token(Option<String>):
      required: false

      The nextToken value returned from a previous paginated IdentityProviderConfigsRequest 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.


  • On success, responds with ListIdentityProviderConfigsOutput with field(s):
  • On failure, responds with SdkError<ListIdentityProviderConfigsError>
source§

impl Client

source

pub fn list_nodegroups(&self) -> ListNodegroupsFluentBuilder

Constructs a fluent builder for the ListNodegroups operation. This operation supports pagination; See into_paginator().

  • The fluent builder is configurable:
    • cluster_name(impl Into<String>) / set_cluster_name(Option<String>):
      required: true

      The name of the Amazon EKS cluster that you would like to list node groups in.


    • max_results(i32) / set_max_results(Option<i32>):
      required: false

      The maximum number of node group results returned by ListNodegroups in paginated output. When you use this parameter, ListNodegroups returns only maxResults results in a single page along with a nextToken response element. You can see the remaining results of the initial request by sending another ListNodegroups request with the returned nextToken value. This value can be between 1 and 100. If you don’t use this parameter, ListNodegroups returns up to 100 results and a nextToken value if applicable.


    • next_token(impl Into<String>) / set_next_token(Option<String>):
      required: false

      The nextToken value returned from a previous paginated ListNodegroups 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.


  • On success, responds with ListNodegroupsOutput with field(s):
    • nodegroups(Option<Vec::<String>>):

      A list of all of the node groups associated with the specified cluster.

    • next_token(Option<String>):

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

  • On failure, responds with SdkError<ListNodegroupsError>
source§

impl Client

source

pub fn list_pod_identity_associations( &self ) -> ListPodIdentityAssociationsFluentBuilder

Constructs a fluent builder for the ListPodIdentityAssociations operation. This operation supports pagination; See into_paginator().

  • The fluent builder is configurable:
    • cluster_name(impl Into<String>) / set_cluster_name(Option<String>):
      required: true

      The name of the cluster that the associations are in.


    • namespace(impl Into<String>) / set_namespace(Option<String>):
      required: false

      The name of the Kubernetes namespace inside the cluster that the associations are in.


    • service_account(impl Into<String>) / set_service_account(Option<String>):
      required: false

      The name of the Kubernetes service account that the associations use.


    • max_results(i32) / set_max_results(Option<i32>):
      required: false

      The maximum number of EKS Pod Identity association results returned by ListPodIdentityAssociations in paginated output. When you use this parameter, ListPodIdentityAssociations returns only maxResults results in a single page along with a nextToken response element. You can see the remaining results of the initial request by sending another ListPodIdentityAssociations request with the returned nextToken value. This value can be between 1 and 100. If you don’t use this parameter, ListPodIdentityAssociations returns up to 100 results and a nextToken value if applicable.


    • next_token(impl Into<String>) / set_next_token(Option<String>):
      required: false

      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.

      This token should be treated as an opaque identifier that is used only to retrieve the next items in a list and not for other programmatic purposes.


  • On success, responds with ListPodIdentityAssociationsOutput with field(s):
    • associations(Option<Vec::<PodIdentityAssociationSummary>>):

      The list of summarized descriptions of the associations that are in the cluster and match any filters that you provided.

      Each summary is simplified by removing these fields compared to the full PodIdentityAssociation :

      • The IAM role: roleArn

      • The timestamp that the association was created at: createdAt

      • The most recent timestamp that the association was modified at:. modifiedAt

      • The tags on the association: tags

    • next_token(Option<String>):

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

      This token should be treated as an opaque identifier that is used only to retrieve the next items in a list and not for other programmatic purposes.

  • On failure, responds with SdkError<ListPodIdentityAssociationsError>
source§

impl Client

source

pub fn list_tags_for_resource(&self) -> ListTagsForResourceFluentBuilder

Constructs a fluent builder for the ListTagsForResource operation.

source§

impl Client

source

pub fn list_updates(&self) -> ListUpdatesFluentBuilder

Constructs a fluent builder for the ListUpdates operation. This operation supports pagination; See into_paginator().

source§

impl Client

source

pub fn register_cluster(&self) -> RegisterClusterFluentBuilder

Constructs a fluent builder for the RegisterCluster operation.

source§

impl Client

source

pub fn tag_resource(&self) -> TagResourceFluentBuilder

Constructs a fluent builder for the TagResource operation.

source§

impl Client

source

pub fn untag_resource(&self) -> UntagResourceFluentBuilder

Constructs a fluent builder for the UntagResource operation.

source§

impl Client

source

pub fn update_addon(&self) -> UpdateAddonFluentBuilder

Constructs a fluent builder for the UpdateAddon operation.

source§

impl Client

source

pub fn update_cluster_config(&self) -> UpdateClusterConfigFluentBuilder

Constructs a fluent builder for the UpdateClusterConfig operation.

source§

impl Client

source

pub fn update_cluster_version(&self) -> UpdateClusterVersionFluentBuilder

Constructs a fluent builder for the UpdateClusterVersion operation.

source§

impl Client

source

pub fn update_eks_anywhere_subscription( &self ) -> UpdateEksAnywhereSubscriptionFluentBuilder

Constructs a fluent builder for the UpdateEksAnywhereSubscription operation.

source§

impl Client

source

pub fn update_nodegroup_config(&self) -> UpdateNodegroupConfigFluentBuilder

Constructs a fluent builder for the UpdateNodegroupConfig operation.

source§

impl Client

source

pub fn update_nodegroup_version(&self) -> UpdateNodegroupVersionFluentBuilder

Constructs a fluent builder for the UpdateNodegroupVersion operation.

source§

impl Client

source

pub fn update_pod_identity_association( &self ) -> UpdatePodIdentityAssociationFluentBuilder

Constructs a fluent builder for the UpdatePodIdentityAssociation operation.

source§

impl Client

source

pub fn from_conf(conf: Config) -> Self

Creates a new client from the service Config.

Panics

This method will panic in the following cases:

  • Retries or timeouts are enabled without a sleep_impl configured.
  • Identity caching is enabled without a sleep_impl and time_source configured.
  • No behavior_version is provided.

The panic message for each of these will have instructions on how to resolve them.

source

pub fn config(&self) -> &Config

Returns the client’s configuration.

source§

impl Client

source

pub fn new(sdk_config: &SdkConfig) -> Self

Creates a new client from an SDK Config.

Panics
  • This method will panic if the sdk_config is missing an async sleep implementation. If you experience this panic, set the sleep_impl on the Config passed into this function to fix it.
  • This method will panic if the sdk_config is missing an HTTP connector. If you experience this panic, set the http_connector on the Config passed into this function to fix it.
  • This method will panic if no BehaviorVersion is provided. If you experience this panic, set behavior_version on the Config or enable the behavior-version-latest Cargo feature.

Trait Implementations§

source§

impl Clone for Client

source§

fn clone(&self) -> Client

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Client

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl !RefUnwindSafe for Client

§

impl Send for Client

§

impl Sync for Client

§

impl Unpin for Client

§

impl !UnwindSafe for Client

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<Unshared, Shared> IntoShared<Shared> for Unsharedwhere Shared: FromUnshared<Unshared>,

source§

fn into_shared(self) -> Shared

Creates a shared type from an unshared type.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more