Skip to content

Commit e713dfd

Browse files
author
awstools
committed
feat(client-location): This release introduces a new parameter to bypasses an API key's expiry conditions and delete the key.
1 parent 8b874f7 commit e713dfd

File tree

4 files changed

+27
-3
lines changed

4 files changed

+27
-3
lines changed

clients/client-location/src/commands/DeleteKeyCommand.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ export interface DeleteKeyCommandOutput extends DeleteKeyResponse, __MetadataBea
3838
* const client = new LocationClient(config);
3939
* const input = { // DeleteKeyRequest
4040
* KeyName: "STRING_VALUE", // required
41+
* ForceDelete: true || false,
4142
* };
4243
* const command = new DeleteKeyCommand(input);
4344
* const response = await client.send(command);

clients/client-location/src/models/models_0.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ export interface ApiKeyRestrictions {
159159
* <li>
160160
* <p>Other than wildcards, you must include the full ARN, including the
161161
* <code>arn</code>, <code>partition</code>, <code>service</code>,
162-
* <code>region</code>, <code>account-id</code> and <code>resource-id</code>,
162+
* <code>region</code>, <code>account-id</code> and <code>resource-id</code>
163163
* delimited by colons (:).</p>
164164
* </li>
165165
* <li>
@@ -469,6 +469,17 @@ export interface DeleteKeyRequest {
469469
* <p>The name of the API key to delete.</p>
470470
*/
471471
KeyName: string | undefined;
472+
473+
/**
474+
* @public
475+
* <p>ForceDelete bypasses an API key's expiry conditions and deletes the key. Set the parameter <code>true</code> to delete the key or to <code>false</code> to not preemptively delete the API key.</p>
476+
* <p>Valid values: <code>true</code>, or <code>false</code>.</p>
477+
* <p>Required: No</p>
478+
* <note>
479+
* <p>This action is irreversible. Only use ForceDelete if you are certain the key is no longer in use.</p>
480+
* </note>
481+
*/
482+
ForceDelete?: boolean;
472483
}
473484

474485
/**

clients/client-location/src/protocols/Aws_restJson1.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -765,6 +765,9 @@ export const se_DeleteKeyCommand = async (
765765
const headers: any = {};
766766
b.bp("/metadata/v0/keys/{KeyName}");
767767
b.p("KeyName", () => input.KeyName!, "{KeyName}", false);
768+
const query: any = map({
769+
[_fD]: [() => input.ForceDelete !== void 0, () => input[_FD]!.toString()],
770+
});
768771
let body: any;
769772
let { hostname: resolvedHostname } = await context.endpoint();
770773
if (context.disableHostPrefix !== true) {
@@ -774,7 +777,7 @@ export const se_DeleteKeyCommand = async (
774777
}
775778
}
776779
b.hn(resolvedHostname);
777-
b.m("DELETE").h(headers).b(body);
780+
b.m("DELETE").h(headers).q(query).b(body);
778781
return b.build();
779782
};
780783

@@ -6594,11 +6597,13 @@ const isSerializableHeaderValue = (value: any): boolean =>
65946597

65956598
const _CC = "CacheControl";
65966599
const _CT = "ContentType";
6600+
const _FD = "ForceDelete";
65976601
const _K = "Key";
65986602
const _L = "Language";
65996603
const _TK = "TagKeys";
66006604
const _cc = "cache-control";
66016605
const _ct = "content-type";
6606+
const _fD = "forceDelete";
66026607
const _k = "key";
66036608
const _l = "language";
66046609
const _tK = "tagKeys";

codegen/sdk-codegen/aws-models/location.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109
"AllowResources": {
110110
"target": "com.amazonaws.location#GeoArnList",
111111
"traits": {
112-
"smithy.api#documentation": "<p>A list of allowed resource ARNs that a API key bearer can perform actions on.</p>\n <ul>\n <li>\n <p>The ARN must be the correct ARN for a map, place, or route ARN. You may \n include wildcards in the resource-id to match multiple resources of the \n same type.</p>\n </li>\n <li>\n <p>The resources must be in the same <code>partition</code>, \n <code>region</code>, and <code>account-id</code> as the key that is being \n created.</p>\n </li>\n <li>\n <p>Other than wildcards, you must include the full ARN, including the \n <code>arn</code>, <code>partition</code>, <code>service</code>,\n <code>region</code>, <code>account-id</code> and <code>resource-id</code>,\n delimited by colons (:).</p>\n </li>\n <li>\n <p>No spaces allowed, even with wildcards. For example,\n <code>arn:aws:geo:region:<i>account-id</i>:map/ExampleMap*</code>.</p>\n </li>\n </ul>\n <p>For more information about ARN format, see <a href=\"https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html\">Amazon Resource Names\n (ARNs)</a>.</p>",
112+
"smithy.api#documentation": "<p>A list of allowed resource ARNs that a API key bearer can perform actions on.</p>\n <ul>\n <li>\n <p>The ARN must be the correct ARN for a map, place, or route ARN. You may \n include wildcards in the resource-id to match multiple resources of the \n same type.</p>\n </li>\n <li>\n <p>The resources must be in the same <code>partition</code>, \n <code>region</code>, and <code>account-id</code> as the key that is being \n created.</p>\n </li>\n <li>\n <p>Other than wildcards, you must include the full ARN, including the \n <code>arn</code>, <code>partition</code>, <code>service</code>,\n <code>region</code>, <code>account-id</code> and <code>resource-id</code>\n delimited by colons (:).</p>\n </li>\n <li>\n <p>No spaces allowed, even with wildcards. For example,\n <code>arn:aws:geo:region:<i>account-id</i>:map/ExampleMap*</code>.</p>\n </li>\n </ul>\n <p>For more information about ARN format, see <a href=\"https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html\">Amazon Resource Names\n (ARNs)</a>.</p>",
113113
"smithy.api#length": {
114114
"min": 1,
115115
"max": 5
@@ -2331,6 +2331,13 @@
23312331
"smithy.api#httpLabel": {},
23322332
"smithy.api#required": {}
23332333
}
2334+
},
2335+
"ForceDelete": {
2336+
"target": "smithy.api#Boolean",
2337+
"traits": {
2338+
"smithy.api#documentation": "<p>ForceDelete bypasses an API key's expiry conditions and deletes the key. Set the parameter <code>true</code> to delete the key or to <code>false</code> to not preemptively delete the API key.</p>\n <p>Valid values: <code>true</code>, or <code>false</code>.</p>\n <p>Required: No</p>\n <note>\n <p>This action is irreversible. Only use ForceDelete if you are certain the key is no longer in use.</p>\n </note>",
2339+
"smithy.api#httpQuery": "forceDelete"
2340+
}
23342341
}
23352342
}
23362343
},

0 commit comments

Comments
 (0)