-
Notifications
You must be signed in to change notification settings - Fork 582
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(client-ecr): Released two new APIs along with documentation upda…
…tes. The GetAccountSetting API is used to view the current basic scan type version setting for your registry, while the PutAccountSetting API is used to update the basic scan type version for your registry.
- Loading branch information
awstools
committed
Aug 5, 2024
1 parent
80cb054
commit 6da4252
Showing
9 changed files
with
562 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
93 changes: 93 additions & 0 deletions
93
clients/client-ecr/src/commands/GetAccountSettingCommand.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
// smithy-typescript generated code | ||
import { getEndpointPlugin } from "@smithy/middleware-endpoint"; | ||
import { getSerdePlugin } from "@smithy/middleware-serde"; | ||
import { Command as $Command } from "@smithy/smithy-client"; | ||
import { MetadataBearer as __MetadataBearer } from "@smithy/types"; | ||
|
||
import { ECRClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ECRClient"; | ||
import { commonParams } from "../endpoint/EndpointParameters"; | ||
import { GetAccountSettingRequest, GetAccountSettingResponse } from "../models/models_0"; | ||
import { de_GetAccountSettingCommand, se_GetAccountSettingCommand } from "../protocols/Aws_json1_1"; | ||
|
||
/** | ||
* @public | ||
*/ | ||
export type { __MetadataBearer }; | ||
export { $Command }; | ||
/** | ||
* @public | ||
* | ||
* The input for {@link GetAccountSettingCommand}. | ||
*/ | ||
export interface GetAccountSettingCommandInput extends GetAccountSettingRequest {} | ||
/** | ||
* @public | ||
* | ||
* The output of {@link GetAccountSettingCommand}. | ||
*/ | ||
export interface GetAccountSettingCommandOutput extends GetAccountSettingResponse, __MetadataBearer {} | ||
|
||
/** | ||
* <p>Retrieves the basic scan type version name.</p> | ||
* @example | ||
* Use a bare-bones client and the command you need to make an API call. | ||
* ```javascript | ||
* import { ECRClient, GetAccountSettingCommand } from "@aws-sdk/client-ecr"; // ES Modules import | ||
* // const { ECRClient, GetAccountSettingCommand } = require("@aws-sdk/client-ecr"); // CommonJS import | ||
* const client = new ECRClient(config); | ||
* const input = { // GetAccountSettingRequest | ||
* name: "STRING_VALUE", // required | ||
* }; | ||
* const command = new GetAccountSettingCommand(input); | ||
* const response = await client.send(command); | ||
* // { // GetAccountSettingResponse | ||
* // name: "STRING_VALUE", | ||
* // value: "STRING_VALUE", | ||
* // }; | ||
* | ||
* ``` | ||
* | ||
* @param GetAccountSettingCommandInput - {@link GetAccountSettingCommandInput} | ||
* @returns {@link GetAccountSettingCommandOutput} | ||
* @see {@link GetAccountSettingCommandInput} for command's `input` shape. | ||
* @see {@link GetAccountSettingCommandOutput} for command's `response` shape. | ||
* @see {@link ECRClientResolvedConfig | config} for ECRClient's `config` shape. | ||
* | ||
* @throws {@link InvalidParameterException} (client fault) | ||
* <p>The specified parameter is invalid. Review the available parameters for the API | ||
* request.</p> | ||
* | ||
* @throws {@link ServerException} (server fault) | ||
* <p>These errors are usually caused by a server-side issue.</p> | ||
* | ||
* @throws {@link ValidationException} (client fault) | ||
* <p>There was an exception validating this request.</p> | ||
* | ||
* @throws {@link ECRServiceException} | ||
* <p>Base exception class for all service exceptions from ECR service.</p> | ||
* | ||
* @public | ||
*/ | ||
export class GetAccountSettingCommand extends $Command | ||
.classBuilder< | ||
GetAccountSettingCommandInput, | ||
GetAccountSettingCommandOutput, | ||
ECRClientResolvedConfig, | ||
ServiceInputTypes, | ||
ServiceOutputTypes | ||
>() | ||
.ep({ | ||
...commonParams, | ||
}) | ||
.m(function (this: any, Command: any, cs: any, config: ECRClientResolvedConfig, o: any) { | ||
return [ | ||
getSerdePlugin(config, this.serialize, this.deserialize), | ||
getEndpointPlugin(config, Command.getEndpointParameterInstructions()), | ||
]; | ||
}) | ||
.s("AmazonEC2ContainerRegistry_V20150921", "GetAccountSetting", {}) | ||
.n("ECRClient", "GetAccountSettingCommand") | ||
.f(void 0, void 0) | ||
.ser(se_GetAccountSettingCommand) | ||
.de(de_GetAccountSettingCommand) | ||
.build() {} |
100 changes: 100 additions & 0 deletions
100
clients/client-ecr/src/commands/PutAccountSettingCommand.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
// smithy-typescript generated code | ||
import { getEndpointPlugin } from "@smithy/middleware-endpoint"; | ||
import { getSerdePlugin } from "@smithy/middleware-serde"; | ||
import { Command as $Command } from "@smithy/smithy-client"; | ||
import { MetadataBearer as __MetadataBearer } from "@smithy/types"; | ||
|
||
import { ECRClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ECRClient"; | ||
import { commonParams } from "../endpoint/EndpointParameters"; | ||
import { PutAccountSettingRequest, PutAccountSettingResponse } from "../models/models_0"; | ||
import { de_PutAccountSettingCommand, se_PutAccountSettingCommand } from "../protocols/Aws_json1_1"; | ||
|
||
/** | ||
* @public | ||
*/ | ||
export type { __MetadataBearer }; | ||
export { $Command }; | ||
/** | ||
* @public | ||
* | ||
* The input for {@link PutAccountSettingCommand}. | ||
*/ | ||
export interface PutAccountSettingCommandInput extends PutAccountSettingRequest {} | ||
/** | ||
* @public | ||
* | ||
* The output of {@link PutAccountSettingCommand}. | ||
*/ | ||
export interface PutAccountSettingCommandOutput extends PutAccountSettingResponse, __MetadataBearer {} | ||
|
||
/** | ||
* <p>Allows you to change the basic scan type version by setting the <code>name</code> | ||
* parameter to either <code>CLAIR</code> to <code>AWS_NATIVE</code>.</p> | ||
* @example | ||
* Use a bare-bones client and the command you need to make an API call. | ||
* ```javascript | ||
* import { ECRClient, PutAccountSettingCommand } from "@aws-sdk/client-ecr"; // ES Modules import | ||
* // const { ECRClient, PutAccountSettingCommand } = require("@aws-sdk/client-ecr"); // CommonJS import | ||
* const client = new ECRClient(config); | ||
* const input = { // PutAccountSettingRequest | ||
* name: "STRING_VALUE", // required | ||
* value: "STRING_VALUE", // required | ||
* }; | ||
* const command = new PutAccountSettingCommand(input); | ||
* const response = await client.send(command); | ||
* // { // PutAccountSettingResponse | ||
* // name: "STRING_VALUE", | ||
* // value: "STRING_VALUE", | ||
* // }; | ||
* | ||
* ``` | ||
* | ||
* @param PutAccountSettingCommandInput - {@link PutAccountSettingCommandInput} | ||
* @returns {@link PutAccountSettingCommandOutput} | ||
* @see {@link PutAccountSettingCommandInput} for command's `input` shape. | ||
* @see {@link PutAccountSettingCommandOutput} for command's `response` shape. | ||
* @see {@link ECRClientResolvedConfig | config} for ECRClient's `config` shape. | ||
* | ||
* @throws {@link InvalidParameterException} (client fault) | ||
* <p>The specified parameter is invalid. Review the available parameters for the API | ||
* request.</p> | ||
* | ||
* @throws {@link LimitExceededException} (client fault) | ||
* <p>The operation did not succeed because it would have exceeded a service limit for your | ||
* account. For more information, see <a href="https://docs.aws.amazon.com/AmazonECR/latest/userguide/service-quotas.html">Amazon ECR service quotas</a> in | ||
* the Amazon Elastic Container Registry User Guide.</p> | ||
* | ||
* @throws {@link ServerException} (server fault) | ||
* <p>These errors are usually caused by a server-side issue.</p> | ||
* | ||
* @throws {@link ValidationException} (client fault) | ||
* <p>There was an exception validating this request.</p> | ||
* | ||
* @throws {@link ECRServiceException} | ||
* <p>Base exception class for all service exceptions from ECR service.</p> | ||
* | ||
* @public | ||
*/ | ||
export class PutAccountSettingCommand extends $Command | ||
.classBuilder< | ||
PutAccountSettingCommandInput, | ||
PutAccountSettingCommandOutput, | ||
ECRClientResolvedConfig, | ||
ServiceInputTypes, | ||
ServiceOutputTypes | ||
>() | ||
.ep({ | ||
...commonParams, | ||
}) | ||
.m(function (this: any, Command: any, cs: any, config: ECRClientResolvedConfig, o: any) { | ||
return [ | ||
getSerdePlugin(config, this.serialize, this.deserialize), | ||
getEndpointPlugin(config, Command.getEndpointParameterInstructions()), | ||
]; | ||
}) | ||
.s("AmazonEC2ContainerRegistry_V20150921", "PutAccountSetting", {}) | ||
.n("ECRClient", "PutAccountSettingCommand") | ||
.f(void 0, void 0) | ||
.ser(se_PutAccountSettingCommand) | ||
.de(de_PutAccountSettingCommand) | ||
.build() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.