create_proxy
¶
create_proxy(
name: ProxyName,
type: ProxyType,
proxy_version: ProxyVersion,
role_arn: IamRoleArn,
configuration: ProxyConfiguration,
network_configuration: ProxyNetworkUserConfiguration,
*,
config_overrides: Optional[ELBProxyClientConfig] = None,
attributes: Optional[ProxyAttributeList] = None,
customer_kms_key_arn: Optional[CustomerKmsKeyArn] = None,
tags: Optional[TagMap] = None,
client_token: Optional[ClientToken] = None,
) -> CreateProxyResponse
Creates a proxy. A proxy is a fully managed, Envoy-based proxy that runs your Envoy configuration on Amazon EC2 instances inside your own virtual private cloud (VPC). AWS provisions and scales the proxy, upgrades the Envoy version, patches the operating system, and monitors its health.
Parameters:
-
name(ProxyName) –The name of the proxy. The name must be unique within your account for the Region. The valid characters are a-z, 0-9, and hyphens (-). You can't use a hyphen as the first or last character.
-
type(ProxyType) –The type of proxy.
-
proxy_version(ProxyVersion) –The version of the proxy software, in
major.minorformat. -
role_arn(IamRoleArn) –The Amazon Resource Name (ARN) of the IAM role that provides permissions to the code that your Envoy configuration runs on the proxy, such as filters and extensions. These are the permissions that this code needs when it calls AWS services.
-
configuration(ProxyConfiguration) –The configuration for the proxy.
-
network_configuration(ProxyNetworkUserConfiguration) –The network configuration for the proxy.
-
attributes(Optional[ProxyAttributeList], default:None) –The attributes for the proxy. Attributes can be changed after creation. Attributes that you don't specify are set to their default values.
-
customer_kms_key_arn(Optional[CustomerKmsKeyArn], default:None) –The Amazon Resource Name (ARN) of the customer managed KMS key used to encrypt the proxy's configuration content. If you don't specify a key, the default service-owned key is used.
-
tags(Optional[TagMap], default:None) –The tags for the proxy.
-
client_token(Optional[ClientToken], default:None) –A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
Raises:
-
InternalServerException–An unexpected error occurred while processing the request.
-
ThrottlingException–The limit on the number of requests per second was exceeded.
-
AccessDeniedException–The user does not have sufficient access to perform this action.
-
ConflictException–The request conflicts with the current state of the resource.
-
OperationNotPermittedException–The requested operation is not permitted.
-
ServiceQuotaExceededException–The request would cause a service quota to be exceeded.
-
ValidationException–The input does not satisfy the constraints specified by an AWS service.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
To create a proxy The following example creates a proxy with the specified name, Envoy version, IAM role, and configuration file. The proxy is internet-facing over IPv4, runs in the specified subnets with the specified security group, and has deletion protection enabled.
>>> client.create_proxy(name='my-proxy', type='envoy', proxy_version='1.40', role_arn='arn:aws:iam::123456789012:role/my-proxy-role', configuration={'configurationFile': {'configurationBytes': 'c3RhdGljX3Jlc291cmNlczoge30K'}}, network_configuration={'ipConfiguration': {'ipAddressingConfiguration': {'ipv4Addressability': 'internet-facing', 'ipv6Addressability': 'off'}}, 'vpcConfiguration': {'subnets': [{'subnetId': 'subnet-8360a9e7'}, {'subnetId': 'subnet-b7d581c0'}], 'securityGroups': [{'securityGroupId': 'sg-903004f8'}]}}, attributes=[{'key': 'deletion_protection.enabled', 'value': 'true'}], tags={'Environment': 'production'})
Source code in docs_src/capo_elb_proxy/_services/elb_proxy.py
471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 | |