diff --git a/clients/client-location/src/commands/DeleteKeyCommand.ts b/clients/client-location/src/commands/DeleteKeyCommand.ts index 26a218c2edac..5c8363a86ebe 100644 --- a/clients/client-location/src/commands/DeleteKeyCommand.ts +++ b/clients/client-location/src/commands/DeleteKeyCommand.ts @@ -38,6 +38,7 @@ export interface DeleteKeyCommandOutput extends DeleteKeyResponse, __MetadataBea * const client = new LocationClient(config); * const input = { // DeleteKeyRequest * KeyName: "STRING_VALUE", // required + * ForceDelete: true || false, * }; * const command = new DeleteKeyCommand(input); * const response = await client.send(command); diff --git a/clients/client-location/src/models/models_0.ts b/clients/client-location/src/models/models_0.ts index 91f3414ee424..8a18f02ec52d 100644 --- a/clients/client-location/src/models/models_0.ts +++ b/clients/client-location/src/models/models_0.ts @@ -159,7 +159,7 @@ export interface ApiKeyRestrictions { *
  • *

    Other than wildcards, you must include the full ARN, including the * arn, partition, service, - * region, account-id and resource-id, + * region, account-id and resource-id * delimited by colons (:).

    *
  • *
  • @@ -469,6 +469,17 @@ export interface DeleteKeyRequest { *

    The name of the API key to delete.

    */ KeyName: string | undefined; + + /** + * @public + *

    ForceDelete bypasses an API key's expiry conditions and deletes the key. Set the parameter true to delete the key or to false to not preemptively delete the API key.

    + *

    Valid values: true, or false.

    + *

    Required: No

    + * + *

    This action is irreversible. Only use ForceDelete if you are certain the key is no longer in use.

    + *
    + */ + ForceDelete?: boolean; } /** diff --git a/clients/client-location/src/protocols/Aws_restJson1.ts b/clients/client-location/src/protocols/Aws_restJson1.ts index f2b350043b57..04ad62a584d3 100644 --- a/clients/client-location/src/protocols/Aws_restJson1.ts +++ b/clients/client-location/src/protocols/Aws_restJson1.ts @@ -765,6 +765,9 @@ export const se_DeleteKeyCommand = async ( const headers: any = {}; b.bp("/metadata/v0/keys/{KeyName}"); b.p("KeyName", () => input.KeyName!, "{KeyName}", false); + const query: any = map({ + [_fD]: [() => input.ForceDelete !== void 0, () => input[_FD]!.toString()], + }); let body: any; let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { @@ -774,7 +777,7 @@ export const se_DeleteKeyCommand = async ( } } b.hn(resolvedHostname); - b.m("DELETE").h(headers).b(body); + b.m("DELETE").h(headers).q(query).b(body); return b.build(); }; @@ -6594,11 +6597,13 @@ const isSerializableHeaderValue = (value: any): boolean => const _CC = "CacheControl"; const _CT = "ContentType"; +const _FD = "ForceDelete"; const _K = "Key"; const _L = "Language"; const _TK = "TagKeys"; const _cc = "cache-control"; const _ct = "content-type"; +const _fD = "forceDelete"; const _k = "key"; const _l = "language"; const _tK = "tagKeys"; diff --git a/codegen/sdk-codegen/aws-models/location.json b/codegen/sdk-codegen/aws-models/location.json index 3f8ab47e8cba..7e17f903f96d 100644 --- a/codegen/sdk-codegen/aws-models/location.json +++ b/codegen/sdk-codegen/aws-models/location.json @@ -109,7 +109,7 @@ "AllowResources": { "target": "com.amazonaws.location#GeoArnList", "traits": { - "smithy.api#documentation": "

    A list of allowed resource ARNs that a API key bearer can perform actions on.

    \n \n

    For more information about ARN format, see Amazon Resource Names\n (ARNs).

    ", + "smithy.api#documentation": "

    A list of allowed resource ARNs that a API key bearer can perform actions on.

    \n \n

    For more information about ARN format, see Amazon Resource Names\n (ARNs).

    ", "smithy.api#length": { "min": 1, "max": 5 @@ -2331,6 +2331,13 @@ "smithy.api#httpLabel": {}, "smithy.api#required": {} } + }, + "ForceDelete": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

    ForceDelete bypasses an API key's expiry conditions and deletes the key. Set the parameter true to delete the key or to false to not preemptively delete the API key.

    \n

    Valid values: true, or false.

    \n

    Required: No

    \n \n

    This action is irreversible. Only use ForceDelete if you are certain the key is no longer in use.

    \n
    ", + "smithy.api#httpQuery": "forceDelete" + } } } },