Skip to content

Commit

Permalink
test(client-secrets-manager): schema testing
Browse files Browse the repository at this point in the history
  • Loading branch information
kuhe committed Feb 19, 2025
1 parent f073f96 commit b87ce5f
Show file tree
Hide file tree
Showing 30 changed files with 1,311 additions and 404 deletions.
2 changes: 2 additions & 0 deletions clients/client-secrets-manager/src/SecretsManagerClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import {
getHttpAuthSchemeEndpointRuleSetPlugin,
getHttpSigningPlugin,
} from "@smithy/core";
import { getSchemaSerdePlugin } from "@smithy/core/schema";
import { getContentLengthPlugin } from "@smithy/middleware-content-length";
import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint";
import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry";
Expand Down Expand Up @@ -409,6 +410,7 @@ export class SecretsManagerClient extends __Client<
const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
super(_config_8);
this.config = _config_8;
this.middlewareStack.use(getSchemaSerdePlugin(this.config));
this.middlewareStack.use(getUserAgentPlugin(this.config));
this.middlewareStack.use(getRetryPlugin(this.config));
this.middlewareStack.use(getContentLengthPlugin(this.config));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// 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";

Expand All @@ -10,7 +9,7 @@ import {
BatchGetSecretValueResponse,
BatchGetSecretValueResponseFilterSensitiveLog,
} from "../models/models_0";
import { de_BatchGetSecretValueCommand, se_BatchGetSecretValueCommand } from "../protocols/Aws_json1_1";
import { BatchGetSecretValue } from "../schemas/com.amazonaws.secretsmanager";
import { SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SecretsManagerClient";

/**
Expand Down Expand Up @@ -197,16 +196,12 @@ export class BatchGetSecretValueCommand extends $Command
>()
.ep(commonParams)
.m(function (this: any, Command: any, cs: any, config: SecretsManagerClientResolvedConfig, o: any) {
return [
getSerdePlugin(config, this.serialize, this.deserialize),
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
];
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
.s("secretsmanager", "BatchGetSecretValue", {})
.n("SecretsManagerClient", "BatchGetSecretValueCommand")
.f(void 0, BatchGetSecretValueResponseFilterSensitiveLog)
.ser(se_BatchGetSecretValueCommand)
.de(de_BatchGetSecretValueCommand)
.sc(BatchGetSecretValue)
.build() {
/** @internal type navigation helper, not in runtime. */
protected declare static __types: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
// 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 { commonParams } from "../endpoint/EndpointParameters";
import { CancelRotateSecretRequest, CancelRotateSecretResponse } from "../models/models_0";
import { de_CancelRotateSecretCommand, se_CancelRotateSecretCommand } from "../protocols/Aws_json1_1";
import { CancelRotateSecret } from "../schemas/com.amazonaws.secretsmanager";
import { SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SecretsManagerClient";

/**
Expand Down Expand Up @@ -131,16 +130,12 @@ export class CancelRotateSecretCommand extends $Command
>()
.ep(commonParams)
.m(function (this: any, Command: any, cs: any, config: SecretsManagerClientResolvedConfig, o: any) {
return [
getSerdePlugin(config, this.serialize, this.deserialize),
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
];
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
.s("secretsmanager", "CancelRotateSecret", {})
.n("SecretsManagerClient", "CancelRotateSecretCommand")
.f(void 0, void 0)
.ser(se_CancelRotateSecretCommand)
.de(de_CancelRotateSecretCommand)
.sc(CancelRotateSecret)
.build() {
/** @internal type navigation helper, not in runtime. */
protected declare static __types: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
// 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 { commonParams } from "../endpoint/EndpointParameters";
import { CreateSecretRequest, CreateSecretRequestFilterSensitiveLog, CreateSecretResponse } from "../models/models_0";
import { de_CreateSecretCommand, se_CreateSecretCommand } from "../protocols/Aws_json1_1";
import { CreateSecret } from "../schemas/com.amazonaws.secretsmanager";
import { SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SecretsManagerClient";

/**
Expand Down Expand Up @@ -202,16 +201,12 @@ export class CreateSecretCommand extends $Command
>()
.ep(commonParams)
.m(function (this: any, Command: any, cs: any, config: SecretsManagerClientResolvedConfig, o: any) {
return [
getSerdePlugin(config, this.serialize, this.deserialize),
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
];
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
.s("secretsmanager", "CreateSecret", {})
.n("SecretsManagerClient", "CreateSecretCommand")
.f(CreateSecretRequestFilterSensitiveLog, void 0)
.ser(se_CreateSecretCommand)
.de(de_CreateSecretCommand)
.sc(CreateSecret)
.build() {
/** @internal type navigation helper, not in runtime. */
protected declare static __types: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
// 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 { commonParams } from "../endpoint/EndpointParameters";
import { DeleteResourcePolicyRequest, DeleteResourcePolicyResponse } from "../models/models_0";
import { de_DeleteResourcePolicyCommand, se_DeleteResourcePolicyCommand } from "../protocols/Aws_json1_1";
import { DeleteResourcePolicy } from "../schemas/com.amazonaws.secretsmanager";
import { SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SecretsManagerClient";

/**
Expand Down Expand Up @@ -120,16 +119,12 @@ export class DeleteResourcePolicyCommand extends $Command
>()
.ep(commonParams)
.m(function (this: any, Command: any, cs: any, config: SecretsManagerClientResolvedConfig, o: any) {
return [
getSerdePlugin(config, this.serialize, this.deserialize),
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
];
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
.s("secretsmanager", "DeleteResourcePolicy", {})
.n("SecretsManagerClient", "DeleteResourcePolicyCommand")
.f(void 0, void 0)
.ser(se_DeleteResourcePolicyCommand)
.de(de_DeleteResourcePolicyCommand)
.sc(DeleteResourcePolicy)
.build() {
/** @internal type navigation helper, not in runtime. */
protected declare static __types: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
// 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 { commonParams } from "../endpoint/EndpointParameters";
import { DeleteSecretRequest, DeleteSecretResponse } from "../models/models_0";
import { de_DeleteSecretCommand, se_DeleteSecretCommand } from "../protocols/Aws_json1_1";
import { DeleteSecret } from "../schemas/com.amazonaws.secretsmanager";
import { SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SecretsManagerClient";

/**
Expand Down Expand Up @@ -145,16 +144,12 @@ export class DeleteSecretCommand extends $Command
>()
.ep(commonParams)
.m(function (this: any, Command: any, cs: any, config: SecretsManagerClientResolvedConfig, o: any) {
return [
getSerdePlugin(config, this.serialize, this.deserialize),
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
];
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
.s("secretsmanager", "DeleteSecret", {})
.n("SecretsManagerClient", "DeleteSecretCommand")
.f(void 0, void 0)
.ser(se_DeleteSecretCommand)
.de(de_DeleteSecretCommand)
.sc(DeleteSecret)
.build() {
/** @internal type navigation helper, not in runtime. */
protected declare static __types: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
// 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 { commonParams } from "../endpoint/EndpointParameters";
import { DescribeSecretRequest, DescribeSecretResponse } from "../models/models_0";
import { de_DescribeSecretCommand, se_DescribeSecretCommand } from "../protocols/Aws_json1_1";
import { DescribeSecret } from "../schemas/com.amazonaws.secretsmanager";
import { SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SecretsManagerClient";

/**
Expand Down Expand Up @@ -170,16 +169,12 @@ export class DescribeSecretCommand extends $Command
>()
.ep(commonParams)
.m(function (this: any, Command: any, cs: any, config: SecretsManagerClientResolvedConfig, o: any) {
return [
getSerdePlugin(config, this.serialize, this.deserialize),
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
];
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
.s("secretsmanager", "DescribeSecret", {})
.n("SecretsManagerClient", "DescribeSecretCommand")
.f(void 0, void 0)
.ser(se_DescribeSecretCommand)
.de(de_DescribeSecretCommand)
.sc(DescribeSecret)
.build() {
/** @internal type navigation helper, not in runtime. */
protected declare static __types: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// 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";

Expand All @@ -10,7 +9,7 @@ import {
GetRandomPasswordResponse,
GetRandomPasswordResponseFilterSensitiveLog,
} from "../models/models_0";
import { de_GetRandomPasswordCommand, se_GetRandomPasswordCommand } from "../protocols/Aws_json1_1";
import { GetRandomPassword } from "../schemas/com.amazonaws.secretsmanager";
import { SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SecretsManagerClient";

/**
Expand Down Expand Up @@ -130,16 +129,12 @@ export class GetRandomPasswordCommand extends $Command
>()
.ep(commonParams)
.m(function (this: any, Command: any, cs: any, config: SecretsManagerClientResolvedConfig, o: any) {
return [
getSerdePlugin(config, this.serialize, this.deserialize),
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
];
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
.s("secretsmanager", "GetRandomPassword", {})
.n("SecretsManagerClient", "GetRandomPasswordCommand")
.f(void 0, GetRandomPasswordResponseFilterSensitiveLog)
.ser(se_GetRandomPasswordCommand)
.de(de_GetRandomPasswordCommand)
.sc(GetRandomPassword)
.build() {
/** @internal type navigation helper, not in runtime. */
protected declare static __types: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
// 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 { commonParams } from "../endpoint/EndpointParameters";
import { GetResourcePolicyRequest, GetResourcePolicyResponse } from "../models/models_0";
import { de_GetResourcePolicyCommand, se_GetResourcePolicyCommand } from "../protocols/Aws_json1_1";
import { GetResourcePolicy } from "../schemas/com.amazonaws.secretsmanager";
import { SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SecretsManagerClient";

/**
Expand Down Expand Up @@ -124,16 +123,12 @@ export class GetResourcePolicyCommand extends $Command
>()
.ep(commonParams)
.m(function (this: any, Command: any, cs: any, config: SecretsManagerClientResolvedConfig, o: any) {
return [
getSerdePlugin(config, this.serialize, this.deserialize),
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
];
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
.s("secretsmanager", "GetResourcePolicy", {})
.n("SecretsManagerClient", "GetResourcePolicyCommand")
.f(void 0, void 0)
.ser(se_GetResourcePolicyCommand)
.de(de_GetResourcePolicyCommand)
.sc(GetResourcePolicy)
.build() {
/** @internal type navigation helper, not in runtime. */
protected declare static __types: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// 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";

Expand All @@ -10,7 +9,7 @@ import {
GetSecretValueResponse,
GetSecretValueResponseFilterSensitiveLog,
} from "../models/models_0";
import { de_GetSecretValueCommand, se_GetSecretValueCommand } from "../protocols/Aws_json1_1";
import { GetSecretValue } from "../schemas/com.amazonaws.secretsmanager";
import { SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SecretsManagerClient";

/**
Expand Down Expand Up @@ -151,16 +150,12 @@ export class GetSecretValueCommand extends $Command
>()
.ep(commonParams)
.m(function (this: any, Command: any, cs: any, config: SecretsManagerClientResolvedConfig, o: any) {
return [
getSerdePlugin(config, this.serialize, this.deserialize),
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
];
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
.s("secretsmanager", "GetSecretValue", {})
.n("SecretsManagerClient", "GetSecretValueCommand")
.f(void 0, GetSecretValueResponseFilterSensitiveLog)
.ser(se_GetSecretValueCommand)
.de(de_GetSecretValueCommand)
.sc(GetSecretValue)
.build() {
/** @internal type navigation helper, not in runtime. */
protected declare static __types: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
// 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 { commonParams } from "../endpoint/EndpointParameters";
import { ListSecretVersionIdsRequest, ListSecretVersionIdsResponse } from "../models/models_0";
import { de_ListSecretVersionIdsCommand, se_ListSecretVersionIdsCommand } from "../protocols/Aws_json1_1";
import { ListSecretVersionIds } from "../schemas/com.amazonaws.secretsmanager";
import { SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SecretsManagerClient";

/**
Expand Down Expand Up @@ -145,16 +144,12 @@ export class ListSecretVersionIdsCommand extends $Command
>()
.ep(commonParams)
.m(function (this: any, Command: any, cs: any, config: SecretsManagerClientResolvedConfig, o: any) {
return [
getSerdePlugin(config, this.serialize, this.deserialize),
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
];
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
.s("secretsmanager", "ListSecretVersionIds", {})
.n("SecretsManagerClient", "ListSecretVersionIdsCommand")
.f(void 0, void 0)
.ser(se_ListSecretVersionIdsCommand)
.de(de_ListSecretVersionIdsCommand)
.sc(ListSecretVersionIds)
.build() {
/** @internal type navigation helper, not in runtime. */
protected declare static __types: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
// 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 { commonParams } from "../endpoint/EndpointParameters";
import { ListSecretsRequest, ListSecretsResponse } from "../models/models_0";
import { de_ListSecretsCommand, se_ListSecretsCommand } from "../protocols/Aws_json1_1";
import { ListSecrets } from "../schemas/com.amazonaws.secretsmanager";
import { SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SecretsManagerClient";

/**
Expand Down Expand Up @@ -188,16 +187,12 @@ export class ListSecretsCommand extends $Command
>()
.ep(commonParams)
.m(function (this: any, Command: any, cs: any, config: SecretsManagerClientResolvedConfig, o: any) {
return [
getSerdePlugin(config, this.serialize, this.deserialize),
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
];
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
.s("secretsmanager", "ListSecrets", {})
.n("SecretsManagerClient", "ListSecretsCommand")
.f(void 0, void 0)
.ser(se_ListSecretsCommand)
.de(de_ListSecretsCommand)
.sc(ListSecrets)
.build() {
/** @internal type navigation helper, not in runtime. */
protected declare static __types: {
Expand Down
Loading

0 comments on commit b87ce5f

Please sign in to comment.