@aws-sdk/client-eks
Version:
AWS SDK for JavaScript Eks Client for Node.js, Browser and React Native
254 lines (253 loc) • 11.8 kB
TypeScript
import { Command as $Command } from "@smithy/smithy-client";
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
import { EKSClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EKSClient";
import { DescribeClusterRequest, DescribeClusterResponse } from "../models/models_0";
/**
* @public
*/
export type { __MetadataBearer };
export { $Command };
/**
* @public
*
* The input for {@link DescribeClusterCommand}.
*/
export interface DescribeClusterCommandInput extends DescribeClusterRequest {
}
/**
* @public
*
* The output of {@link DescribeClusterCommand}.
*/
export interface DescribeClusterCommandOutput extends DescribeClusterResponse, __MetadataBearer {
}
declare const DescribeClusterCommand_base: {
new (input: DescribeClusterCommandInput): import("@smithy/smithy-client").CommandImpl<DescribeClusterCommandInput, DescribeClusterCommandOutput, EKSClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
new (__0_0: DescribeClusterCommandInput): import("@smithy/smithy-client").CommandImpl<DescribeClusterCommandInput, DescribeClusterCommandOutput, EKSClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
};
/**
* <p>Describes an Amazon EKS cluster.</p>
* <p>The API server endpoint and certificate authority data returned by this operation are
* required for <code>kubelet</code> and <code>kubectl</code> to communicate with your
* Kubernetes API server. For more information, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/create-kubeconfig.html">Creating or
* updating a <code>kubeconfig</code> file for an Amazon EKS cluster</a>.</p>
* <note>
* <p>The API server endpoint and certificate authority data aren't available until the
* cluster reaches the <code>ACTIVE</code> state.</p>
* </note>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { EKSClient, DescribeClusterCommand } from "@aws-sdk/client-eks"; // ES Modules import
* // const { EKSClient, DescribeClusterCommand } = require("@aws-sdk/client-eks"); // CommonJS import
* const client = new EKSClient(config);
* const input = { // DescribeClusterRequest
* name: "STRING_VALUE", // required
* };
* const command = new DescribeClusterCommand(input);
* const response = await client.send(command);
* // { // DescribeClusterResponse
* // cluster: { // Cluster
* // name: "STRING_VALUE",
* // arn: "STRING_VALUE",
* // createdAt: new Date("TIMESTAMP"),
* // version: "STRING_VALUE",
* // endpoint: "STRING_VALUE",
* // roleArn: "STRING_VALUE",
* // resourcesVpcConfig: { // VpcConfigResponse
* // subnetIds: [ // StringList
* // "STRING_VALUE",
* // ],
* // securityGroupIds: [
* // "STRING_VALUE",
* // ],
* // clusterSecurityGroupId: "STRING_VALUE",
* // vpcId: "STRING_VALUE",
* // endpointPublicAccess: true || false,
* // endpointPrivateAccess: true || false,
* // publicAccessCidrs: [
* // "STRING_VALUE",
* // ],
* // },
* // kubernetesNetworkConfig: { // KubernetesNetworkConfigResponse
* // serviceIpv4Cidr: "STRING_VALUE",
* // serviceIpv6Cidr: "STRING_VALUE",
* // ipFamily: "ipv4" || "ipv6",
* // elasticLoadBalancing: { // ElasticLoadBalancing
* // enabled: true || false,
* // },
* // },
* // logging: { // Logging
* // clusterLogging: [ // LogSetups
* // { // LogSetup
* // types: [ // LogTypes
* // "api" || "audit" || "authenticator" || "controllerManager" || "scheduler",
* // ],
* // enabled: true || false,
* // },
* // ],
* // },
* // identity: { // Identity
* // oidc: { // OIDC
* // issuer: "STRING_VALUE",
* // },
* // },
* // status: "CREATING" || "ACTIVE" || "DELETING" || "FAILED" || "UPDATING" || "PENDING",
* // certificateAuthority: { // Certificate
* // data: "STRING_VALUE",
* // },
* // clientRequestToken: "STRING_VALUE",
* // platformVersion: "STRING_VALUE",
* // tags: { // TagMap
* // "<keys>": "STRING_VALUE",
* // },
* // encryptionConfig: [ // EncryptionConfigList
* // { // EncryptionConfig
* // resources: [
* // "STRING_VALUE",
* // ],
* // provider: { // Provider
* // keyArn: "STRING_VALUE",
* // },
* // },
* // ],
* // connectorConfig: { // ConnectorConfigResponse
* // activationId: "STRING_VALUE",
* // activationCode: "STRING_VALUE",
* // activationExpiry: new Date("TIMESTAMP"),
* // provider: "STRING_VALUE",
* // roleArn: "STRING_VALUE",
* // },
* // id: "STRING_VALUE",
* // health: { // ClusterHealth
* // issues: [ // ClusterIssueList
* // { // ClusterIssue
* // code: "AccessDenied" || "ClusterUnreachable" || "ConfigurationConflict" || "InternalFailure" || "ResourceLimitExceeded" || "ResourceNotFound" || "IamRoleNotFound" || "VpcNotFound" || "InsufficientFreeAddresses" || "Ec2ServiceNotSubscribed" || "Ec2SubnetNotFound" || "Ec2SecurityGroupNotFound" || "KmsGrantRevoked" || "KmsKeyNotFound" || "KmsKeyMarkedForDeletion" || "KmsKeyDisabled" || "StsRegionalEndpointDisabled" || "UnsupportedVersion" || "Other",
* // message: "STRING_VALUE",
* // resourceIds: "<StringList>",
* // },
* // ],
* // },
* // outpostConfig: { // OutpostConfigResponse
* // outpostArns: "<StringList>", // required
* // controlPlaneInstanceType: "STRING_VALUE", // required
* // controlPlanePlacement: { // ControlPlanePlacementResponse
* // groupName: "STRING_VALUE",
* // },
* // },
* // accessConfig: { // AccessConfigResponse
* // bootstrapClusterCreatorAdminPermissions: true || false,
* // authenticationMode: "API" || "API_AND_CONFIG_MAP" || "CONFIG_MAP",
* // },
* // upgradePolicy: { // UpgradePolicyResponse
* // supportType: "STANDARD" || "EXTENDED",
* // },
* // zonalShiftConfig: { // ZonalShiftConfigResponse
* // enabled: true || false,
* // },
* // remoteNetworkConfig: { // RemoteNetworkConfigResponse
* // remoteNodeNetworks: [ // RemoteNodeNetworkList
* // { // RemoteNodeNetwork
* // cidrs: "<StringList>",
* // },
* // ],
* // remotePodNetworks: [ // RemotePodNetworkList
* // { // RemotePodNetwork
* // cidrs: "<StringList>",
* // },
* // ],
* // },
* // computeConfig: { // ComputeConfigResponse
* // enabled: true || false,
* // nodePools: "<StringList>",
* // nodeRoleArn: "STRING_VALUE",
* // },
* // storageConfig: { // StorageConfigResponse
* // blockStorage: { // BlockStorage
* // enabled: true || false,
* // },
* // },
* // },
* // };
*
* ```
*
* @param DescribeClusterCommandInput - {@link DescribeClusterCommandInput}
* @returns {@link DescribeClusterCommandOutput}
* @see {@link DescribeClusterCommandInput} for command's `input` shape.
* @see {@link DescribeClusterCommandOutput} for command's `response` shape.
* @see {@link EKSClientResolvedConfig | config} for EKSClient's `config` shape.
*
* @throws {@link ClientException} (client fault)
* <p>These errors are usually caused by a client action. Actions can include using an
* action or resource on behalf of an <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts.html">IAM principal</a> that doesn't have permissions to use
* the action or resource or specifying an identifier that is not valid.</p>
*
* @throws {@link ResourceNotFoundException} (client fault)
* <p>The specified resource could not be found. You can view your available clusters with
* <code>ListClusters</code>. You can view your available managed node groups with
* <code>ListNodegroups</code>. Amazon EKS clusters and node groups are Amazon Web Services Region
* specific.</p>
*
* @throws {@link ServerException} (server fault)
* <p>These errors are usually caused by a server-side issue.</p>
*
* @throws {@link ServiceUnavailableException} (server fault)
* <p>The service is unavailable. Back off and retry the operation.</p>
*
* @throws {@link EKSServiceException}
* <p>Base exception class for all service exceptions from EKS service.</p>
*
* @public
* @example To describe a cluster
* ```javascript
* // This example command provides a description of the specified cluster in your default region.
* const input = {
* "name": "devel"
* };
* const command = new DescribeClusterCommand(input);
* const response = await client.send(command);
* /* response ==
* {
* "cluster": {
* "version": "1.10",
* "name": "devel",
* "arn": "arn:aws:eks:us-west-2:012345678910:cluster/devel",
* "certificateAuthority": {
* "data": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUN5RENDQWJDZ0F3SUJBZ0lCQURBTkJna3Foa2lHOXcwQkFRc0ZBREFWTVJNd0VRWURWUVFERXdwcmRXSmwKY201bGRHVnpNQjRYRFRFNE1EVXpNVEl6TVRFek1Wb1hEVEk0TURVeU9ESXpNVEV6TVZvd0ZURVRNQkVHQTFVRQpBeE1LYTNWaVpYSnVaWFJsY3pDQ0FTSXdEUVlKS29aSWh2Y05BUUVCQlFBRGdnRVBBR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EQUtKUT0KLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo="
* },
* "createdAt": 1527807879.988,
* "endpoint": "https://A0DCCD80A04F01705DD065655C30CC3D.yl4.us-west-2.eks.amazonaws.com",
* "resourcesVpcConfig": {
* "securityGroupIds": [
* "sg-6979fe18"
* ],
* "subnetIds": [
* "subnet-6782e71e",
* "subnet-e7e761ac"
* ],
* "vpcId": "vpc-950809ec"
* },
* "roleArn": "arn:aws:iam::012345678910:role/eks-service-role-AWSServiceRoleForAmazonEKS-J7ONKE3BQ4PI",
* "status": "ACTIVE"
* }
* }
* *\/
* // example id: to-describe-a-cluster-1527868708512
* ```
*
*/
export declare class DescribeClusterCommand extends DescribeClusterCommand_base {
/** @internal type navigation helper, not in runtime. */
protected static __types: {
api: {
input: DescribeClusterRequest;
output: DescribeClusterResponse;
};
sdk: {
input: DescribeClusterCommandInput;
output: DescribeClusterCommandOutput;
};
};
}