Skip to content

Bedrock Agent  >  Operations  >  create_vpc_configuration

create_vpc_configuration

Operation

create_vpc_configuration async

create_vpc_configuration(input: CreateVpcConfigurationInput, plugins: list[Plugin] | None = None) -> CreateVpcConfigurationOutput

Creates a VPC configuration that lets a knowledge base connect to a resource in your private VPC. This operation is asynchronous: it returns a vpcConfigurationId with status CREATING. Poll GetVpcConfiguration until the status becomes CREATED or CREATE_FAILED.

Parameters:

Name Type Description Default
input CreateVpcConfigurationInput

An instance of CreateVpcConfigurationInput.

required
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None

Returns:

Type Description
CreateVpcConfigurationOutput

An instance of CreateVpcConfigurationOutput.

Input

CreateVpcConfigurationInput dataclass

Dataclass for CreateVpcConfigurationInput structure.

Attributes

client_token class-attribute instance-attribute
client_token: str | None = None

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.

description class-attribute instance-attribute
description: str | None = None

An optional description of the VPC configuration. If you don't specify a description, the VPC configuration has no description.

host_header class-attribute instance-attribute
host_header: str | None = None

An optional HTTP Host header value to send when invoking the resource. Set this only if your resource (or an upstream router or ingress) routes by the Host header and that host differs from the target. This setting is independent of tlsServerName.

knowledge_base_id class-attribute instance-attribute
knowledge_base_id: str | None = None

The unique identifier of the knowledge base to associate this VPC configuration with.

name class-attribute instance-attribute
name: str | None = None

An optional human-readable name for the VPC configuration. If you don't specify a name, the VPC configuration has no name.

port class-attribute instance-attribute
port: int | None = None

The port on which to reach the resource.

protocol class-attribute instance-attribute
protocol: str | None = None

The protocol used to connect to the resource. Specify HTTP for plaintext or HTTPS for TLS. When you specify HTTPS, you must also provide tlsServerName.

resolution_mode class-attribute instance-attribute
resolution_mode: str | None = None

Controls how a domain-name resourceTarget is 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, use IN_VPC.

resource_target class-attribute instance-attribute
resource_target: str | None = None

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

subnet_ids class-attribute instance-attribute
subnet_ids: list[str] | None = None

The subnets, in the VPC identified by vpcId, that the knowledge base uses to connect to the resource.

tls_server_name class-attribute instance-attribute
tls_server_name: str | None = None

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 protocol is HTTPS. Set it to a hostname on your certificate, such as app.internal.example.com. You can use a single leftmost wildcard, such as *.example.com. The value must be a hostname without a port.

vpc_id class-attribute instance-attribute
vpc_id: str | None = None

The identifier of the VPC that the knowledge base connects through to reach the resource.

Output

CreateVpcConfigurationOutput dataclass

Dataclass for CreateVpcConfigurationOutput structure.

Attributes

response_metadata class-attribute instance-attribute
response_metadata: ResponseMetadata = field(default=EMPTY_RESPONSE_METADATA, repr=False, compare=False)

Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.

status instance-attribute
status: str

The current status of the VPC configuration. Immediately after creation this is CREATING.

vpc_configuration_id instance-attribute
vpc_configuration_id: str

The unique identifier of the VPC configuration that was created.