create_api_key
¶
create_api_key(
*,
config_overrides: Optional[APIGatewayClientConfig] = None,
name: Optional[String] = None,
description: Optional[String] = None,
enabled: Optional[Boolean] = None,
generate_distinct_id: Optional[Boolean] = None,
value: Optional[String] = None,
stage_keys: Optional[ListOfStageKeys] = None,
customer_id: Optional[String] = None,
tags: Optional[MapOfStringToString] = None,
) -> ApiKey
Create an ApiKey resource.
Parameters:
-
name(Optional[String], default:None) –The name of the ApiKey.
-
description(Optional[String], default:None) –The description of the ApiKey.
-
enabled(Optional[Boolean], default:None) –Specifies whether the ApiKey can be used by callers.
-
generate_distinct_id(Optional[Boolean], default:None) –Specifies whether (
true) or not (false) the key identifier is distinct from the created API key value. This parameter is deprecated and should not be used. -
value(Optional[String], default:None) –Specifies a value of the API key.
-
stage_keys(Optional[ListOfStageKeys], default:None) –DEPRECATED FOR USAGE PLANS - Specifies stages associated with the API key.
-
customer_id(Optional[String], default:None) –An Amazon Web Services Marketplace customer identifier, when integrating with the Amazon Web Services SaaS Marketplace.
-
tags(Optional[MapOfStringToString], default:None) –The key-value map of strings. The valid character set is [a-zA-Z+-=._:/]. The tag key can be up to 128 characters and must not start with
aws:. The tag value can be up to 256 characters.
Raises:
-
BadRequestException–The submitted request is not valid, for example, the input is incomplete or incorrect. See the accompanying error message for details.
-
ConflictException–The request configuration has conflicts. For details, see the accompanying error message.
-
LimitExceededException–The request exceeded the rate limit. Retry after the specified time period.
-
NotFoundException–The requested resource is not found. Make sure that the request URI is correct.
-
TooManyRequestsException–The request has reached its throttling limit. Retry after the specified time period.
-
UnauthorizedException–The request is denied because the caller has insufficient permissions.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_api_gateway/_services/api_gateway.py
361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 | |