AgentsforBedrock / Client / create_vpc_configuration
create_vpc_configuration¶
- AgentsforBedrock.Client.create_vpc_configuration(**kwargs)¶
Creates a VPC configuration that lets a knowledge base connect to a resource in your private VPC. This operation is asynchronous: it returns a
vpcConfigurationIdwith statusCREATING. PollGetVpcConfigurationuntil the status becomesCREATEDorCREATE_FAILED.See also: AWS API Documentation
Request Syntax
response = client.create_vpc_configuration( knowledgeBaseId='string', clientToken='string', vpcId='string', subnetIds=[ 'string', ], resourceTarget='string', port=123, protocol='HTTP'|'HTTPS', resolutionMode='PUBLIC'|'IN_VPC', hostHeader='string', tlsServerName='string', name='string', description='string' )
- Parameters:
knowledgeBaseId (string) –
[REQUIRED]
The unique identifier of the knowledge base to associate this VPC configuration with.
clientToken (string) –
A unique, case-sensitive identifier to ensure that the operation completes no more than one time. If this token matches a previous request, the service ignores the request but does not return an error.
This field is autopopulated if not provided.
vpcId (string) –
[REQUIRED]
The identifier of the VPC that the knowledge base connects through to reach the resource.
subnetIds (list) –
[REQUIRED]
The subnets, in the VPC identified by
vpcId, that the knowledge base uses to connect to the resource.(string) –
resourceTarget (string) –
[REQUIRED]
The private IPv4 address or DNS name of the resource you want the knowledge base to reach. The target must be privately reachable from inside your VPC, such as an internal load balancer or a private IP. The following are not supported:
Internet-facing endpoints
Loopback addresses
Link-local addresses
Wildcard addresses
Multicast addresses
IPv6 literals
port (integer) –
[REQUIRED]
The port on which to reach the resource.
protocol (string) –
[REQUIRED]
The protocol used to connect to the resource. Specify
HTTPfor plaintext orHTTPSfor TLS. When you specifyHTTPS, you must also providetlsServerName.resolutionMode (string) –
[REQUIRED]
Controls how a domain-name
resourceTargetis resolved. This applies only when the target is a domain name; it has no effect for IP-address targets, which have no name to resolve. In all cases the resolved address must be reachable from inside your VPC. Valid values:IN_VPC(default, recommended) – The target domain name is resolved privately, using the DNS resolvers of the VPC, such as private Route 53 hosted zones or on-premises DNS reachable from the VPC. Use this for targets that are private to your VPC, such as internal load balancers, private hosted-zone names, or on-premises hosts.PUBLIC– The target domain name is resolved against public DNS resolvers. Select this only when the target’s domain name must be resolved through public DNS and the resulting address is still reachable from the VPC, an uncommon split-horizon configuration. If you are unsure, useIN_VPC.
hostHeader (string) – An optional HTTP
Hostheader value to send when invoking the resource. Set this only if your resource (or an upstream router or ingress) routes by theHostheader and that host differs from the target. This setting is independent oftlsServerName.tlsServerName (string) – The expected TLS server name. The service matches this value against the Subject Alternative Names on your resource’s TLS certificate during invocation. This field is required when
protocolisHTTPS. Set it to a hostname on your certificate, such asapp.internal.example.com. You can use a single leftmost wildcard, such as*.example.com. The value must be a hostname without a port.name (string) – An optional human-readable name for the VPC configuration. If you don’t specify a name, the VPC configuration has no name.
description (string) – An optional description of the VPC configuration. If you don’t specify a description, the VPC configuration has no description.
- Return type:
dict
- Returns:
Response Syntax
{ 'vpcConfigurationId': 'string', 'status': 'CREATING'|'CREATED'|'DELETING'|'CREATE_FAILED'|'DELETE_FAILED' }
Response Structure
(dict) –
vpcConfigurationId (string) –
The unique identifier of the VPC configuration that was created.
status (string) –
The current status of the VPC configuration. Immediately after creation this is
CREATING.
Exceptions