Skip to content

Commit

Permalink
feat(client-emr-containers): This release adds support for integratio…
Browse files Browse the repository at this point in the history
…n with EKS AccessEntry APIs to enable automatic Cluster Access for EMR on EKS.
  • Loading branch information
awstools committed Apr 4, 2024
1 parent 379b756 commit 36c6750
Show file tree
Hide file tree
Showing 9 changed files with 89 additions and 5 deletions.
2 changes: 1 addition & 1 deletion clients/client-emr-containers/README.md
Expand Up @@ -10,7 +10,7 @@ AWS SDK for JavaScript EMRContainers Client for Node.js, Browser and React Nativ
you to run open-source big data frameworks on Amazon Elastic Kubernetes Service (Amazon EKS).
With this deployment option, you can focus on running analytics workloads while Amazon EMR on EKS builds, configures, and manages containers for open-source applications.
For more information about Amazon EMR on EKS concepts and tasks, see <a href="https://docs.aws.amazon.com/emr/latest/EMR-on-EKS-DevelopmentGuide/emr-eks.html">What is
shared id="EMR-EKS"/></a>.</p>
Amazon EMR on EKS</a>.</p>
<p>
<i>Amazon EMR containers</i> is the API name for Amazon EMR on EKS. The <code>emr-containers</code> prefix is used in the following
scenarios: </p>
Expand Down
2 changes: 1 addition & 1 deletion clients/client-emr-containers/src/EMRContainers.ts
Expand Up @@ -431,7 +431,7 @@ export interface EMRContainers {
* you to run open-source big data frameworks on Amazon Elastic Kubernetes Service (Amazon EKS).
* With this deployment option, you can focus on running analytics workloads while Amazon EMR on EKS builds, configures, and manages containers for open-source applications.
* For more information about Amazon EMR on EKS concepts and tasks, see <a href="https://docs.aws.amazon.com/emr/latest/EMR-on-EKS-DevelopmentGuide/emr-eks.html">What is
* shared id="EMR-EKS"/></a>.</p>
* Amazon EMR on EKS</a>.</p>
* <p>
* <i>Amazon EMR containers</i> is the API name for Amazon EMR on EKS. The <code>emr-containers</code> prefix is used in the following
* scenarios: </p>
Expand Down
2 changes: 1 addition & 1 deletion clients/client-emr-containers/src/EMRContainersClient.ts
Expand Up @@ -343,7 +343,7 @@ export interface EMRContainersClientResolvedConfig extends EMRContainersClientRe
* you to run open-source big data frameworks on Amazon Elastic Kubernetes Service (Amazon EKS).
* With this deployment option, you can focus on running analytics workloads while Amazon EMR on EKS builds, configures, and manages containers for open-source applications.
* For more information about Amazon EMR on EKS concepts and tasks, see <a href="https://docs.aws.amazon.com/emr/latest/EMR-on-EKS-DevelopmentGuide/emr-eks.html">What is
* shared id="EMR-EKS"/></a>.</p>
* Amazon EMR on EKS</a>.</p>
* <p>
* <i>Amazon EMR containers</i> is the API name for Amazon EMR on EKS. The <code>emr-containers</code> prefix is used in the following
* scenarios: </p>
Expand Down
Expand Up @@ -69,6 +69,9 @@ export interface CreateVirtualClusterCommandOutput extends CreateVirtualClusterR
* @see {@link CreateVirtualClusterCommandOutput} for command's `response` shape.
* @see {@link EMRContainersClientResolvedConfig | config} for EMRContainersClient's `config` shape.
*
* @throws {@link EKSRequestThrottledException} (client fault)
* <p>The request exceeded the Amazon EKS API operation limits.</p>
*
* @throws {@link InternalServerException} (server fault)
* <p>This is an internal server exception.</p>
*
Expand Down
Expand Up @@ -49,6 +49,7 @@ export interface ListVirtualClustersCommandOutput extends ListVirtualClustersRes
* ],
* maxResults: Number("int"),
* nextToken: "STRING_VALUE",
* eksAccessEntryIntegrated: true || false,
* };
* const command = new ListVirtualClustersCommand(input);
* const response = await client.send(command);
Expand Down
2 changes: 1 addition & 1 deletion clients/client-emr-containers/src/index.ts
Expand Up @@ -5,7 +5,7 @@
* you to run open-source big data frameworks on Amazon Elastic Kubernetes Service (Amazon EKS).
* With this deployment option, you can focus on running analytics workloads while Amazon EMR on EKS builds, configures, and manages containers for open-source applications.
* For more information about Amazon EMR on EKS concepts and tasks, see <a href="https://docs.aws.amazon.com/emr/latest/EMR-on-EKS-DevelopmentGuide/emr-eks.html">What is
* shared id="EMR-EKS"/></a>.</p>
* Amazon EMR on EKS</a>.</p>
* <p>
* <i>Amazon EMR containers</i> is the API name for Amazon EMR on EKS. The <code>emr-containers</code> prefix is used in the following
* scenarios: </p>
Expand Down
28 changes: 28 additions & 0 deletions clients/client-emr-containers/src/models/models_0.ts
Expand Up @@ -541,6 +541,26 @@ export interface CreateVirtualClusterResponse {
arn?: string;
}

/**
* <p>The request exceeded the Amazon EKS API operation limits.</p>
* @public
*/
export class EKSRequestThrottledException extends __BaseException {
readonly name: "EKSRequestThrottledException" = "EKSRequestThrottledException";
readonly $fault: "client" = "client";
/**
* @internal
*/
constructor(opts: __ExceptionOptionType<EKSRequestThrottledException, __BaseException>) {
super({
name: "EKSRequestThrottledException",
$fault: "client",
...opts,
});
Object.setPrototypeOf(this, EKSRequestThrottledException.prototype);
}
}

/**
* @public
*/
Expand Down Expand Up @@ -1170,6 +1190,14 @@ export interface ListVirtualClustersRequest {
* @public
*/
nextToken?: string;

/**
* <p>Optional Boolean that specifies whether the operation should return the
* virtual clusters that have the access entry integration enabled or disabled. If not specified,
* the operation returns all applicable virtual clusters.</p>
* @public
*/
eksAccessEntryIntegrated?: boolean;
}

/**
Expand Down
26 changes: 26 additions & 0 deletions clients/client-emr-containers/src/protocols/Aws_restJson1.ts
Expand Up @@ -90,6 +90,7 @@ import {
ContainerLogRotationConfiguration,
ContainerProvider,
EksInfo,
EKSRequestThrottledException,
Endpoint,
InternalServerException,
JobDriver,
Expand Down Expand Up @@ -456,6 +457,7 @@ export const se_ListVirtualClustersCommand = async (
[_s]: [() => input.states !== void 0, () => (input[_s]! || []).map((_entry) => _entry as any)],
[_mR]: [() => input.maxResults !== void 0, () => input[_mR]!.toString()],
[_nT]: [, input[_nT]!],
[_eAEI]: [() => input.eksAccessEntryIntegrated !== void 0, () => input[_eAEI]!.toString()],
});
let body: any;
b.m("GET").h(headers).q(query).b(body);
Expand Down Expand Up @@ -989,6 +991,9 @@ const de_CommandError = async (output: __HttpResponse, context: __SerdeContext):
case "ResourceNotFoundException":
case "com.amazonaws.emrcontainers#ResourceNotFoundException":
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
case "EKSRequestThrottledException":
case "com.amazonaws.emrcontainers#EKSRequestThrottledException":
throw await de_EKSRequestThrottledExceptionRes(parsedOutput, context);
case "RequestThrottledException":
case "com.amazonaws.emrcontainers#RequestThrottledException":
throw await de_RequestThrottledExceptionRes(parsedOutput, context);
Expand All @@ -1003,6 +1008,26 @@ const de_CommandError = async (output: __HttpResponse, context: __SerdeContext):
};

const throwDefaultError = withBaseException(__BaseException);
/**
* deserializeAws_restJson1EKSRequestThrottledExceptionRes
*/
const de_EKSRequestThrottledExceptionRes = async (
parsedOutput: any,
context: __SerdeContext
): Promise<EKSRequestThrottledException> => {
const contents: any = map({});
const data: any = parsedOutput.body;
const doc = take(data, {
message: __expectString,
});
Object.assign(contents, doc);
const exception = new EKSRequestThrottledException({
$metadata: deserializeMetadata(parsedOutput),
...contents,
});
return __decorateServiceException(exception, parsedOutput.body);
};

/**
* deserializeAws_restJson1InternalServerExceptionRes
*/
Expand Down Expand Up @@ -1437,6 +1462,7 @@ const _cA = "createdAfter";
const _cB = "createdBefore";
const _cPI = "containerProviderId";
const _cPT = "containerProviderType";
const _eAEI = "eksAccessEntryIntegrated";
const _mR = "maxResults";
const _n = "name";
const _nT = "nextToken";
Expand Down
28 changes: 27 additions & 1 deletion codegen/sdk-codegen/aws-models/emr-containers.json
Expand Up @@ -116,7 +116,7 @@
"name": "emr-containers"
},
"aws.protocols#restJson1": {},
"smithy.api#documentation": "<p>Amazon EMR on EKS provides a deployment option for Amazon EMR that allows\n you to run open-source big data frameworks on Amazon Elastic Kubernetes Service (Amazon EKS).\n With this deployment option, you can focus on running analytics workloads while Amazon EMR on EKS builds, configures, and manages containers for open-source applications.\n For more information about Amazon EMR on EKS concepts and tasks, see <a href=\"https://docs.aws.amazon.com/emr/latest/EMR-on-EKS-DevelopmentGuide/emr-eks.html\">What is\n shared id=\"EMR-EKS\"/></a>.</p>\n <p>\n <i>Amazon EMR containers</i> is the API name for Amazon EMR on EKS. The <code>emr-containers</code> prefix is used in the following\n scenarios: </p>\n <ul>\n <li>\n <p>It is the prefix in the CLI commands for Amazon EMR on EKS. For example,\n <code>aws emr-containers start-job-run</code>.</p>\n </li>\n <li>\n <p>It is the prefix before IAM policy actions for Amazon EMR on EKS. For\n example, <code>\"Action\": [ \"emr-containers:StartJobRun\"]</code>. For more\n information, see <a href=\"https://docs.aws.amazon.com/emr/latest/EMR-on-EKS-DevelopmentGuide/security_iam_service-with-iam.html#security_iam_service-with-iam-id-based-policies-actions\">Policy actions for Amazon EMR on EKS</a>.</p>\n </li>\n <li>\n <p>It is the prefix used in Amazon EMR on EKS service endpoints. For example,\n <code>emr-containers.us-east-2.amazonaws.com</code>. For more information, see\n <a href=\"https://docs.aws.amazon.com/emr/latest/EMR-on-EKS-DevelopmentGuide/service-quotas.html#service-endpoints\">Amazon EMR on EKSService Endpoints</a>.</p>\n </li>\n </ul>",
"smithy.api#documentation": "<p>Amazon EMR on EKS provides a deployment option for Amazon EMR that allows\n you to run open-source big data frameworks on Amazon Elastic Kubernetes Service (Amazon EKS).\n With this deployment option, you can focus on running analytics workloads while Amazon EMR on EKS builds, configures, and manages containers for open-source applications.\n For more information about Amazon EMR on EKS concepts and tasks, see <a href=\"https://docs.aws.amazon.com/emr/latest/EMR-on-EKS-DevelopmentGuide/emr-eks.html\">What is\n Amazon EMR on EKS</a>.</p>\n <p>\n <i>Amazon EMR containers</i> is the API name for Amazon EMR on EKS. The <code>emr-containers</code> prefix is used in the following\n scenarios: </p>\n <ul>\n <li>\n <p>It is the prefix in the CLI commands for Amazon EMR on EKS. For example,\n <code>aws emr-containers start-job-run</code>.</p>\n </li>\n <li>\n <p>It is the prefix before IAM policy actions for Amazon EMR on EKS. For\n example, <code>\"Action\": [ \"emr-containers:StartJobRun\"]</code>. For more\n information, see <a href=\"https://docs.aws.amazon.com/emr/latest/EMR-on-EKS-DevelopmentGuide/security_iam_service-with-iam.html#security_iam_service-with-iam-id-based-policies-actions\">Policy actions for Amazon EMR on EKS</a>.</p>\n </li>\n <li>\n <p>It is the prefix used in Amazon EMR on EKS service endpoints. For example,\n <code>emr-containers.us-east-2.amazonaws.com</code>. For more information, see\n <a href=\"https://docs.aws.amazon.com/emr/latest/EMR-on-EKS-DevelopmentGuide/service-quotas.html#service-endpoints\">Amazon EMR on EKSService Endpoints</a>.</p>\n </li>\n </ul>",
"smithy.api#title": "Amazon EMR Containers",
"smithy.rules#endpointRuleSet": {
"version": "1.0",
Expand Down Expand Up @@ -1018,6 +1018,9 @@
"smithy.api#pattern": "^([A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{4}|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{2}==)?$"
}
},
"com.amazonaws.emrcontainers#Boolean": {
"type": "boolean"
},
"com.amazonaws.emrcontainers#CancelJobRun": {
"type": "operation",
"input": {
Expand Down Expand Up @@ -1526,6 +1529,9 @@
"target": "com.amazonaws.emrcontainers#CreateVirtualClusterResponse"
},
"errors": [
{
"target": "com.amazonaws.emrcontainers#EKSRequestThrottledException"
},
{
"target": "com.amazonaws.emrcontainers#InternalServerException"
},
Expand Down Expand Up @@ -2064,6 +2070,19 @@
"smithy.api#output": {}
}
},
"com.amazonaws.emrcontainers#EKSRequestThrottledException": {
"type": "structure",
"members": {
"message": {
"target": "com.amazonaws.emrcontainers#String1024"
}
},
"traits": {
"smithy.api#documentation": "<p>The request exceeded the Amazon EKS API operation limits.</p>",
"smithy.api#error": "client",
"smithy.api#httpError": 429
}
},
"com.amazonaws.emrcontainers#EksInfo": {
"type": "structure",
"members": {
Expand Down Expand Up @@ -3280,6 +3299,13 @@
"smithy.api#documentation": "<p>The token for the next set of virtual clusters to return. </p>",
"smithy.api#httpQuery": "nextToken"
}
},
"eksAccessEntryIntegrated": {
"target": "com.amazonaws.emrcontainers#Boolean",
"traits": {
"smithy.api#documentation": "<p>Optional Boolean that specifies whether the operation should return the \n virtual clusters that have the access entry integration enabled or disabled. If not specified,\n the operation returns all applicable virtual clusters.</p>",
"smithy.api#httpQuery": "eksAccessEntryIntegrated"
}
}
},
"traits": {
Expand Down

0 comments on commit 36c6750

Please sign in to comment.