@aws-sdk/client-secrets-manager 3.310.0 → 3.312.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,220 +7,154 @@ const uuid_1 = require("uuid");
7
7
  const models_0_1 = require("../models/models_0");
8
8
  const SecretsManagerServiceException_1 = require("../models/SecretsManagerServiceException");
9
9
  const se_CancelRotateSecretCommand = async (input, context) => {
10
- const headers = {
11
- "content-type": "application/x-amz-json-1.1",
12
- "x-amz-target": "secretsmanager.CancelRotateSecret",
13
- };
10
+ const headers = sharedHeaders("CancelRotateSecret");
14
11
  let body;
15
12
  body = JSON.stringify(se_CancelRotateSecretRequest(input, context));
16
13
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
17
14
  };
18
15
  exports.se_CancelRotateSecretCommand = se_CancelRotateSecretCommand;
19
16
  const se_CreateSecretCommand = async (input, context) => {
20
- const headers = {
21
- "content-type": "application/x-amz-json-1.1",
22
- "x-amz-target": "secretsmanager.CreateSecret",
23
- };
17
+ const headers = sharedHeaders("CreateSecret");
24
18
  let body;
25
19
  body = JSON.stringify(se_CreateSecretRequest(input, context));
26
20
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
27
21
  };
28
22
  exports.se_CreateSecretCommand = se_CreateSecretCommand;
29
23
  const se_DeleteResourcePolicyCommand = async (input, context) => {
30
- const headers = {
31
- "content-type": "application/x-amz-json-1.1",
32
- "x-amz-target": "secretsmanager.DeleteResourcePolicy",
33
- };
24
+ const headers = sharedHeaders("DeleteResourcePolicy");
34
25
  let body;
35
26
  body = JSON.stringify(se_DeleteResourcePolicyRequest(input, context));
36
27
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
37
28
  };
38
29
  exports.se_DeleteResourcePolicyCommand = se_DeleteResourcePolicyCommand;
39
30
  const se_DeleteSecretCommand = async (input, context) => {
40
- const headers = {
41
- "content-type": "application/x-amz-json-1.1",
42
- "x-amz-target": "secretsmanager.DeleteSecret",
43
- };
31
+ const headers = sharedHeaders("DeleteSecret");
44
32
  let body;
45
33
  body = JSON.stringify(se_DeleteSecretRequest(input, context));
46
34
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
47
35
  };
48
36
  exports.se_DeleteSecretCommand = se_DeleteSecretCommand;
49
37
  const se_DescribeSecretCommand = async (input, context) => {
50
- const headers = {
51
- "content-type": "application/x-amz-json-1.1",
52
- "x-amz-target": "secretsmanager.DescribeSecret",
53
- };
38
+ const headers = sharedHeaders("DescribeSecret");
54
39
  let body;
55
40
  body = JSON.stringify(se_DescribeSecretRequest(input, context));
56
41
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
57
42
  };
58
43
  exports.se_DescribeSecretCommand = se_DescribeSecretCommand;
59
44
  const se_GetRandomPasswordCommand = async (input, context) => {
60
- const headers = {
61
- "content-type": "application/x-amz-json-1.1",
62
- "x-amz-target": "secretsmanager.GetRandomPassword",
63
- };
45
+ const headers = sharedHeaders("GetRandomPassword");
64
46
  let body;
65
47
  body = JSON.stringify(se_GetRandomPasswordRequest(input, context));
66
48
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
67
49
  };
68
50
  exports.se_GetRandomPasswordCommand = se_GetRandomPasswordCommand;
69
51
  const se_GetResourcePolicyCommand = async (input, context) => {
70
- const headers = {
71
- "content-type": "application/x-amz-json-1.1",
72
- "x-amz-target": "secretsmanager.GetResourcePolicy",
73
- };
52
+ const headers = sharedHeaders("GetResourcePolicy");
74
53
  let body;
75
54
  body = JSON.stringify(se_GetResourcePolicyRequest(input, context));
76
55
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
77
56
  };
78
57
  exports.se_GetResourcePolicyCommand = se_GetResourcePolicyCommand;
79
58
  const se_GetSecretValueCommand = async (input, context) => {
80
- const headers = {
81
- "content-type": "application/x-amz-json-1.1",
82
- "x-amz-target": "secretsmanager.GetSecretValue",
83
- };
59
+ const headers = sharedHeaders("GetSecretValue");
84
60
  let body;
85
61
  body = JSON.stringify(se_GetSecretValueRequest(input, context));
86
62
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
87
63
  };
88
64
  exports.se_GetSecretValueCommand = se_GetSecretValueCommand;
89
65
  const se_ListSecretsCommand = async (input, context) => {
90
- const headers = {
91
- "content-type": "application/x-amz-json-1.1",
92
- "x-amz-target": "secretsmanager.ListSecrets",
93
- };
66
+ const headers = sharedHeaders("ListSecrets");
94
67
  let body;
95
68
  body = JSON.stringify(se_ListSecretsRequest(input, context));
96
69
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
97
70
  };
98
71
  exports.se_ListSecretsCommand = se_ListSecretsCommand;
99
72
  const se_ListSecretVersionIdsCommand = async (input, context) => {
100
- const headers = {
101
- "content-type": "application/x-amz-json-1.1",
102
- "x-amz-target": "secretsmanager.ListSecretVersionIds",
103
- };
73
+ const headers = sharedHeaders("ListSecretVersionIds");
104
74
  let body;
105
75
  body = JSON.stringify(se_ListSecretVersionIdsRequest(input, context));
106
76
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
107
77
  };
108
78
  exports.se_ListSecretVersionIdsCommand = se_ListSecretVersionIdsCommand;
109
79
  const se_PutResourcePolicyCommand = async (input, context) => {
110
- const headers = {
111
- "content-type": "application/x-amz-json-1.1",
112
- "x-amz-target": "secretsmanager.PutResourcePolicy",
113
- };
80
+ const headers = sharedHeaders("PutResourcePolicy");
114
81
  let body;
115
82
  body = JSON.stringify(se_PutResourcePolicyRequest(input, context));
116
83
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
117
84
  };
118
85
  exports.se_PutResourcePolicyCommand = se_PutResourcePolicyCommand;
119
86
  const se_PutSecretValueCommand = async (input, context) => {
120
- const headers = {
121
- "content-type": "application/x-amz-json-1.1",
122
- "x-amz-target": "secretsmanager.PutSecretValue",
123
- };
87
+ const headers = sharedHeaders("PutSecretValue");
124
88
  let body;
125
89
  body = JSON.stringify(se_PutSecretValueRequest(input, context));
126
90
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
127
91
  };
128
92
  exports.se_PutSecretValueCommand = se_PutSecretValueCommand;
129
93
  const se_RemoveRegionsFromReplicationCommand = async (input, context) => {
130
- const headers = {
131
- "content-type": "application/x-amz-json-1.1",
132
- "x-amz-target": "secretsmanager.RemoveRegionsFromReplication",
133
- };
94
+ const headers = sharedHeaders("RemoveRegionsFromReplication");
134
95
  let body;
135
96
  body = JSON.stringify(se_RemoveRegionsFromReplicationRequest(input, context));
136
97
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
137
98
  };
138
99
  exports.se_RemoveRegionsFromReplicationCommand = se_RemoveRegionsFromReplicationCommand;
139
100
  const se_ReplicateSecretToRegionsCommand = async (input, context) => {
140
- const headers = {
141
- "content-type": "application/x-amz-json-1.1",
142
- "x-amz-target": "secretsmanager.ReplicateSecretToRegions",
143
- };
101
+ const headers = sharedHeaders("ReplicateSecretToRegions");
144
102
  let body;
145
103
  body = JSON.stringify(se_ReplicateSecretToRegionsRequest(input, context));
146
104
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
147
105
  };
148
106
  exports.se_ReplicateSecretToRegionsCommand = se_ReplicateSecretToRegionsCommand;
149
107
  const se_RestoreSecretCommand = async (input, context) => {
150
- const headers = {
151
- "content-type": "application/x-amz-json-1.1",
152
- "x-amz-target": "secretsmanager.RestoreSecret",
153
- };
108
+ const headers = sharedHeaders("RestoreSecret");
154
109
  let body;
155
110
  body = JSON.stringify(se_RestoreSecretRequest(input, context));
156
111
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
157
112
  };
158
113
  exports.se_RestoreSecretCommand = se_RestoreSecretCommand;
159
114
  const se_RotateSecretCommand = async (input, context) => {
160
- const headers = {
161
- "content-type": "application/x-amz-json-1.1",
162
- "x-amz-target": "secretsmanager.RotateSecret",
163
- };
115
+ const headers = sharedHeaders("RotateSecret");
164
116
  let body;
165
117
  body = JSON.stringify(se_RotateSecretRequest(input, context));
166
118
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
167
119
  };
168
120
  exports.se_RotateSecretCommand = se_RotateSecretCommand;
169
121
  const se_StopReplicationToReplicaCommand = async (input, context) => {
170
- const headers = {
171
- "content-type": "application/x-amz-json-1.1",
172
- "x-amz-target": "secretsmanager.StopReplicationToReplica",
173
- };
122
+ const headers = sharedHeaders("StopReplicationToReplica");
174
123
  let body;
175
124
  body = JSON.stringify(se_StopReplicationToReplicaRequest(input, context));
176
125
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
177
126
  };
178
127
  exports.se_StopReplicationToReplicaCommand = se_StopReplicationToReplicaCommand;
179
128
  const se_TagResourceCommand = async (input, context) => {
180
- const headers = {
181
- "content-type": "application/x-amz-json-1.1",
182
- "x-amz-target": "secretsmanager.TagResource",
183
- };
129
+ const headers = sharedHeaders("TagResource");
184
130
  let body;
185
131
  body = JSON.stringify(se_TagResourceRequest(input, context));
186
132
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
187
133
  };
188
134
  exports.se_TagResourceCommand = se_TagResourceCommand;
189
135
  const se_UntagResourceCommand = async (input, context) => {
190
- const headers = {
191
- "content-type": "application/x-amz-json-1.1",
192
- "x-amz-target": "secretsmanager.UntagResource",
193
- };
136
+ const headers = sharedHeaders("UntagResource");
194
137
  let body;
195
138
  body = JSON.stringify(se_UntagResourceRequest(input, context));
196
139
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
197
140
  };
198
141
  exports.se_UntagResourceCommand = se_UntagResourceCommand;
199
142
  const se_UpdateSecretCommand = async (input, context) => {
200
- const headers = {
201
- "content-type": "application/x-amz-json-1.1",
202
- "x-amz-target": "secretsmanager.UpdateSecret",
203
- };
143
+ const headers = sharedHeaders("UpdateSecret");
204
144
  let body;
205
145
  body = JSON.stringify(se_UpdateSecretRequest(input, context));
206
146
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
207
147
  };
208
148
  exports.se_UpdateSecretCommand = se_UpdateSecretCommand;
209
149
  const se_UpdateSecretVersionStageCommand = async (input, context) => {
210
- const headers = {
211
- "content-type": "application/x-amz-json-1.1",
212
- "x-amz-target": "secretsmanager.UpdateSecretVersionStage",
213
- };
150
+ const headers = sharedHeaders("UpdateSecretVersionStage");
214
151
  let body;
215
152
  body = JSON.stringify(se_UpdateSecretVersionStageRequest(input, context));
216
153
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
217
154
  };
218
155
  exports.se_UpdateSecretVersionStageCommand = se_UpdateSecretVersionStageCommand;
219
156
  const se_ValidateResourcePolicyCommand = async (input, context) => {
220
- const headers = {
221
- "content-type": "application/x-amz-json-1.1",
222
- "x-amz-target": "secretsmanager.ValidateResourcePolicy",
223
- };
157
+ const headers = sharedHeaders("ValidateResourcePolicy");
224
158
  let body;
225
159
  body = JSON.stringify(se_ValidateResourcePolicyRequest(input, context));
226
160
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
@@ -1995,6 +1929,12 @@ const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, bod
1995
1929
  }
1996
1930
  return new protocol_http_1.HttpRequest(contents);
1997
1931
  };
1932
+ function sharedHeaders(operation) {
1933
+ return {
1934
+ "content-type": "application/x-amz-json-1.1",
1935
+ "x-amz-target": `secretsmanager.${operation}`,
1936
+ };
1937
+ }
1998
1938
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1999
1939
  if (encoded.length) {
2000
1940
  return JSON.parse(encoded);
@@ -4,199 +4,133 @@ import { v4 as generateIdempotencyToken } from "uuid";
4
4
  import { DecryptionFailure, EncryptionFailure, InternalServiceError, InvalidNextTokenException, InvalidParameterException, InvalidRequestException, LimitExceededException, MalformedPolicyDocumentException, PreconditionNotMetException, PublicPolicyException, ResourceExistsException, ResourceNotFoundException, } from "../models/models_0";
5
5
  import { SecretsManagerServiceException as __BaseException } from "../models/SecretsManagerServiceException";
6
6
  export const se_CancelRotateSecretCommand = async (input, context) => {
7
- const headers = {
8
- "content-type": "application/x-amz-json-1.1",
9
- "x-amz-target": "secretsmanager.CancelRotateSecret",
10
- };
7
+ const headers = sharedHeaders("CancelRotateSecret");
11
8
  let body;
12
9
  body = JSON.stringify(se_CancelRotateSecretRequest(input, context));
13
10
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
14
11
  };
15
12
  export const se_CreateSecretCommand = async (input, context) => {
16
- const headers = {
17
- "content-type": "application/x-amz-json-1.1",
18
- "x-amz-target": "secretsmanager.CreateSecret",
19
- };
13
+ const headers = sharedHeaders("CreateSecret");
20
14
  let body;
21
15
  body = JSON.stringify(se_CreateSecretRequest(input, context));
22
16
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
23
17
  };
24
18
  export const se_DeleteResourcePolicyCommand = async (input, context) => {
25
- const headers = {
26
- "content-type": "application/x-amz-json-1.1",
27
- "x-amz-target": "secretsmanager.DeleteResourcePolicy",
28
- };
19
+ const headers = sharedHeaders("DeleteResourcePolicy");
29
20
  let body;
30
21
  body = JSON.stringify(se_DeleteResourcePolicyRequest(input, context));
31
22
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
32
23
  };
33
24
  export const se_DeleteSecretCommand = async (input, context) => {
34
- const headers = {
35
- "content-type": "application/x-amz-json-1.1",
36
- "x-amz-target": "secretsmanager.DeleteSecret",
37
- };
25
+ const headers = sharedHeaders("DeleteSecret");
38
26
  let body;
39
27
  body = JSON.stringify(se_DeleteSecretRequest(input, context));
40
28
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
41
29
  };
42
30
  export const se_DescribeSecretCommand = async (input, context) => {
43
- const headers = {
44
- "content-type": "application/x-amz-json-1.1",
45
- "x-amz-target": "secretsmanager.DescribeSecret",
46
- };
31
+ const headers = sharedHeaders("DescribeSecret");
47
32
  let body;
48
33
  body = JSON.stringify(se_DescribeSecretRequest(input, context));
49
34
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
50
35
  };
51
36
  export const se_GetRandomPasswordCommand = async (input, context) => {
52
- const headers = {
53
- "content-type": "application/x-amz-json-1.1",
54
- "x-amz-target": "secretsmanager.GetRandomPassword",
55
- };
37
+ const headers = sharedHeaders("GetRandomPassword");
56
38
  let body;
57
39
  body = JSON.stringify(se_GetRandomPasswordRequest(input, context));
58
40
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
59
41
  };
60
42
  export const se_GetResourcePolicyCommand = async (input, context) => {
61
- const headers = {
62
- "content-type": "application/x-amz-json-1.1",
63
- "x-amz-target": "secretsmanager.GetResourcePolicy",
64
- };
43
+ const headers = sharedHeaders("GetResourcePolicy");
65
44
  let body;
66
45
  body = JSON.stringify(se_GetResourcePolicyRequest(input, context));
67
46
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
68
47
  };
69
48
  export const se_GetSecretValueCommand = async (input, context) => {
70
- const headers = {
71
- "content-type": "application/x-amz-json-1.1",
72
- "x-amz-target": "secretsmanager.GetSecretValue",
73
- };
49
+ const headers = sharedHeaders("GetSecretValue");
74
50
  let body;
75
51
  body = JSON.stringify(se_GetSecretValueRequest(input, context));
76
52
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
77
53
  };
78
54
  export const se_ListSecretsCommand = async (input, context) => {
79
- const headers = {
80
- "content-type": "application/x-amz-json-1.1",
81
- "x-amz-target": "secretsmanager.ListSecrets",
82
- };
55
+ const headers = sharedHeaders("ListSecrets");
83
56
  let body;
84
57
  body = JSON.stringify(se_ListSecretsRequest(input, context));
85
58
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
86
59
  };
87
60
  export const se_ListSecretVersionIdsCommand = async (input, context) => {
88
- const headers = {
89
- "content-type": "application/x-amz-json-1.1",
90
- "x-amz-target": "secretsmanager.ListSecretVersionIds",
91
- };
61
+ const headers = sharedHeaders("ListSecretVersionIds");
92
62
  let body;
93
63
  body = JSON.stringify(se_ListSecretVersionIdsRequest(input, context));
94
64
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
95
65
  };
96
66
  export const se_PutResourcePolicyCommand = async (input, context) => {
97
- const headers = {
98
- "content-type": "application/x-amz-json-1.1",
99
- "x-amz-target": "secretsmanager.PutResourcePolicy",
100
- };
67
+ const headers = sharedHeaders("PutResourcePolicy");
101
68
  let body;
102
69
  body = JSON.stringify(se_PutResourcePolicyRequest(input, context));
103
70
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
104
71
  };
105
72
  export const se_PutSecretValueCommand = async (input, context) => {
106
- const headers = {
107
- "content-type": "application/x-amz-json-1.1",
108
- "x-amz-target": "secretsmanager.PutSecretValue",
109
- };
73
+ const headers = sharedHeaders("PutSecretValue");
110
74
  let body;
111
75
  body = JSON.stringify(se_PutSecretValueRequest(input, context));
112
76
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
113
77
  };
114
78
  export const se_RemoveRegionsFromReplicationCommand = async (input, context) => {
115
- const headers = {
116
- "content-type": "application/x-amz-json-1.1",
117
- "x-amz-target": "secretsmanager.RemoveRegionsFromReplication",
118
- };
79
+ const headers = sharedHeaders("RemoveRegionsFromReplication");
119
80
  let body;
120
81
  body = JSON.stringify(se_RemoveRegionsFromReplicationRequest(input, context));
121
82
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
122
83
  };
123
84
  export const se_ReplicateSecretToRegionsCommand = async (input, context) => {
124
- const headers = {
125
- "content-type": "application/x-amz-json-1.1",
126
- "x-amz-target": "secretsmanager.ReplicateSecretToRegions",
127
- };
85
+ const headers = sharedHeaders("ReplicateSecretToRegions");
128
86
  let body;
129
87
  body = JSON.stringify(se_ReplicateSecretToRegionsRequest(input, context));
130
88
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
131
89
  };
132
90
  export const se_RestoreSecretCommand = async (input, context) => {
133
- const headers = {
134
- "content-type": "application/x-amz-json-1.1",
135
- "x-amz-target": "secretsmanager.RestoreSecret",
136
- };
91
+ const headers = sharedHeaders("RestoreSecret");
137
92
  let body;
138
93
  body = JSON.stringify(se_RestoreSecretRequest(input, context));
139
94
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
140
95
  };
141
96
  export const se_RotateSecretCommand = async (input, context) => {
142
- const headers = {
143
- "content-type": "application/x-amz-json-1.1",
144
- "x-amz-target": "secretsmanager.RotateSecret",
145
- };
97
+ const headers = sharedHeaders("RotateSecret");
146
98
  let body;
147
99
  body = JSON.stringify(se_RotateSecretRequest(input, context));
148
100
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
149
101
  };
150
102
  export const se_StopReplicationToReplicaCommand = async (input, context) => {
151
- const headers = {
152
- "content-type": "application/x-amz-json-1.1",
153
- "x-amz-target": "secretsmanager.StopReplicationToReplica",
154
- };
103
+ const headers = sharedHeaders("StopReplicationToReplica");
155
104
  let body;
156
105
  body = JSON.stringify(se_StopReplicationToReplicaRequest(input, context));
157
106
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
158
107
  };
159
108
  export const se_TagResourceCommand = async (input, context) => {
160
- const headers = {
161
- "content-type": "application/x-amz-json-1.1",
162
- "x-amz-target": "secretsmanager.TagResource",
163
- };
109
+ const headers = sharedHeaders("TagResource");
164
110
  let body;
165
111
  body = JSON.stringify(se_TagResourceRequest(input, context));
166
112
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
167
113
  };
168
114
  export const se_UntagResourceCommand = async (input, context) => {
169
- const headers = {
170
- "content-type": "application/x-amz-json-1.1",
171
- "x-amz-target": "secretsmanager.UntagResource",
172
- };
115
+ const headers = sharedHeaders("UntagResource");
173
116
  let body;
174
117
  body = JSON.stringify(se_UntagResourceRequest(input, context));
175
118
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
176
119
  };
177
120
  export const se_UpdateSecretCommand = async (input, context) => {
178
- const headers = {
179
- "content-type": "application/x-amz-json-1.1",
180
- "x-amz-target": "secretsmanager.UpdateSecret",
181
- };
121
+ const headers = sharedHeaders("UpdateSecret");
182
122
  let body;
183
123
  body = JSON.stringify(se_UpdateSecretRequest(input, context));
184
124
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
185
125
  };
186
126
  export const se_UpdateSecretVersionStageCommand = async (input, context) => {
187
- const headers = {
188
- "content-type": "application/x-amz-json-1.1",
189
- "x-amz-target": "secretsmanager.UpdateSecretVersionStage",
190
- };
127
+ const headers = sharedHeaders("UpdateSecretVersionStage");
191
128
  let body;
192
129
  body = JSON.stringify(se_UpdateSecretVersionStageRequest(input, context));
193
130
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
194
131
  };
195
132
  export const se_ValidateResourcePolicyCommand = async (input, context) => {
196
- const headers = {
197
- "content-type": "application/x-amz-json-1.1",
198
- "x-amz-target": "secretsmanager.ValidateResourcePolicy",
199
- };
133
+ const headers = sharedHeaders("ValidateResourcePolicy");
200
134
  let body;
201
135
  body = JSON.stringify(se_ValidateResourcePolicyRequest(input, context));
202
136
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
@@ -1948,6 +1882,12 @@ const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, bod
1948
1882
  }
1949
1883
  return new __HttpRequest(contents);
1950
1884
  };
1885
+ function sharedHeaders(operation) {
1886
+ return {
1887
+ "content-type": "application/x-amz-json-1.1",
1888
+ "x-amz-target": `secretsmanager.${operation}`,
1889
+ };
1890
+ }
1951
1891
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1952
1892
  if (encoded.length) {
1953
1893
  return JSON.parse(encoded);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-secrets-manager",
3
3
  "description": "AWS SDK for JavaScript Secrets Manager Client for Node.js, Browser and React Native",
4
- "version": "3.310.0",
4
+ "version": "3.312.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",
@@ -21,7 +21,7 @@
21
21
  "dependencies": {
22
22
  "@aws-crypto/sha256-browser": "3.0.0",
23
23
  "@aws-crypto/sha256-js": "3.0.0",
24
- "@aws-sdk/client-sts": "3.310.0",
24
+ "@aws-sdk/client-sts": "3.312.0",
25
25
  "@aws-sdk/config-resolver": "3.310.0",
26
26
  "@aws-sdk/credential-provider-node": "3.310.0",
27
27
  "@aws-sdk/fetch-http-handler": "3.310.0",