VPCLattice / Client / create_resource_configuration
create_resource_configuration¶
- VPCLattice.Client.create_resource_configuration(**kwargs)¶
Creates a resource configuration. A resource configuration defines a specific resource. You can associate a resource configuration with a service network or a VPC endpoint.
See also: AWS API Documentation
Request Syntax
response = client.create_resource_configuration( name='string', type='GROUP'|'CHILD'|'SINGLE'|'ARN'|'CIDR', portRanges=[ 'string', ], protocol='TCP'|'TCP_UDP', resourceGatewayIdentifier='string', resourceConfigurationGroupIdentifier='string', resourceConfigurationDefinition={ 'dnsResource': { 'domainName': 'string', 'ipAddressType': 'IPV4'|'IPV6'|'DUALSTACK' }, 'ipResource': { 'ipAddress': 'string' }, 'arnResource': { 'arn': 'string' }, 'cidrResource': { 'cidrRanges': [ 'string', ] } }, allowAssociationToShareableServiceNetwork=True|False, customDomainName='string', groupDomain='string', domainVerificationIdentifier='string', clientToken='string', tags={ 'string': 'string' } )
- Parameters:
name (string) –
[REQUIRED]
The name of the resource configuration. The name must be unique within the account. The valid characters are a-z, 0-9, and hyphens (-). You can’t use a hyphen as the first or last character, or immediately after another hyphen.
type (string) –
[REQUIRED]
The type of resource configuration. A resource configuration can be one of the following types:
SINGLE - A single resource.
GROUP - A group of resources. You must create a group resource configuration before you create a child resource configuration.
CHILD - A single resource that is part of a group resource configuration.
ARN - An Amazon Web Services resource.
CIDR - A network segment, expressed as a range of IP addresses (a CIDR block). Use this type to share a portion of your network rather than an individual resource. A consumer accesses the resources within the CIDR range through a
TunnelVPC endpoint. You can’t add a CIDR resource configuration to a service network. A CIDR resource configuration must be associated with a resource gateway whose DNS resolution is set toIN_VPC.
portRanges (list) –
(SINGLE, GROUP, CHILD, CIDR) The port ranges that a consumer can use to access a resource configuration (for example: 1-65535). You can separate port ranges using commas (for example: 1,2,22-30). To resolve DNS through a CIDR resource configuration, include port 53 in the port ranges.
(string) –
protocol (string) – (SINGLE, GROUP, CIDR) The protocol accepted by the resource configuration. The default is
TCP.TCP_UDPis supported only for CIDR resource configurations; specify it for a CIDR resource configuration to allow DNS resolution, which uses UDP.resourceGatewayIdentifier (string) – (SINGLE, GROUP, ARN, CIDR) The ID or ARN of the resource gateway used to connect to the resource configuration. For a child resource configuration, this value is inherited from the parent resource configuration. For a CIDR resource configuration, the associated resource gateway must have its DNS resolution set to
IN_VPCso that DNS queries resolve in the context of your VPC.resourceConfigurationGroupIdentifier (string) – (CHILD) The ID or ARN of the parent resource configuration of type
GROUP. This is used to associate a child resource configuration with a group resource configuration.resourceConfigurationDefinition (dict) –
Identifies the resource configuration in one of the following ways:
Amazon Resource Name (ARN) - Supported resource-types that are provisioned by Amazon Web Services services, such as RDS databases, can be identified by their ARN.
Domain name - Any domain name that is publicly resolvable.
IP address - For IPv4 and IPv6, only IP addresses in the VPC are supported.
CIDR range - For a resource configuration of type CIDR, specify a
cidrResourcewith one or morecidrRanges(for example,10.0.0.0/16) that cover the IP addresses of the resources you want to make accessible. You can specify up to 10 ranges, using IPv4, IPv6, or both, and each range must include a prefix length. To represent your entire network, specify0.0.0.0/0(IPv4) or::/0(IPv6) as the only range. You can’t use reserved ranges such as169.254.0.0/16,100.64.0.0/10,224.0.0.0/4,fe80::/10, orff00::/8.
Note
This is a Tagged Union structure. Only one of the following top level keys can be set:
dnsResource,ipResource,arnResource,cidrResource.dnsResource (dict) –
The DNS name of the resource.
domainName (string) –
The domain name of the resource.
ipAddressType (string) –
The type of IP address. Dualstack is currently not supported.
ipResource (dict) –
The IP resource.
ipAddress (string) –
The IP address of the IP resource.
arnResource (dict) –
The Amazon Resource Name (ARN) of the resource.
arn (string) –
The Amazon Resource Name (ARN) of the resource.
cidrResource (dict) –
The network segment for a resource configuration of type CIDR, specified as one or more CIDR ranges (
cidrRanges). Resources whose IP addresses fall within these ranges are reachable through aTunnelVPC endpoint.cidrRanges (list) –
The CIDR ranges of the network segment, for example,
10.0.0.0/16.(string) –
allowAssociationToShareableServiceNetwork (boolean) – (SINGLE, GROUP, ARN) Specifies whether the resource configuration can be associated with a sharable service network. The default is false.
customDomainName (string) – A custom domain name for your resource configuration. Additionally, provide a DomainVerificationID to prove your ownership of a domain.
groupDomain (string) – (GROUP) The group domain for a group resource configuration. Any domains that you create for the child resource are subdomains of the group domain. Child resources inherit the verification status of the domain.
domainVerificationIdentifier (string) – The domain verification ID of your verified custom domain name. If you don’t provide an ID, you must configure the DNS settings yourself.
clientToken (string) –
A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you retry a request that completed successfully using the same client token and parameters, the retry succeeds without performing any actions. If the parameters aren’t identical, the retry fails.
This field is autopopulated if not provided.
tags (dict) –
The tags for the resource configuration.
(string) –
The key of the tag.
Constraints: Tag keys are case-sensitive and accept a maximum of 128 Unicode characters. Valid characters are Unicode letters, digits, white space, and any of the following symbols: _ . : / = + - @ May not begin with
aws:.(string) –
The value of the tag.
Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters. Valid characters are Unicode letters, digits, white space, and any of the following symbols: _ . : / = + - @
- Return type:
dict
- Returns:
Response Syntax
{ 'id': 'string', 'name': 'string', 'arn': 'string', 'resourceGatewayId': 'string', 'resourceConfigurationGroupId': 'string', 'type': 'GROUP'|'CHILD'|'SINGLE'|'ARN'|'CIDR', 'portRanges': [ 'string', ], 'protocol': 'TCP'|'TCP_UDP', 'status': 'ACTIVE'|'CREATE_IN_PROGRESS'|'UPDATE_IN_PROGRESS'|'DELETE_IN_PROGRESS'|'CREATE_FAILED'|'UPDATE_FAILED'|'DELETE_FAILED', 'resourceConfigurationDefinition': { 'dnsResource': { 'domainName': 'string', 'ipAddressType': 'IPV4'|'IPV6'|'DUALSTACK' }, 'ipResource': { 'ipAddress': 'string' }, 'arnResource': { 'arn': 'string' }, 'cidrResource': { 'cidrRanges': [ 'string', ] } }, 'allowAssociationToShareableServiceNetwork': True|False, 'createdAt': datetime(2015, 1, 1), 'failureReason': 'string', 'customDomainName': 'string', 'domainVerificationId': 'string', 'groupDomain': 'string', 'domainVerificationArn': 'string' }
Response Structure
(dict) –
id (string) –
The ID of the resource configuration.
name (string) –
The name of the resource configuration.
arn (string) –
The Amazon Resource Name (ARN) of the resource configuration.
resourceGatewayId (string) –
The ID of the resource gateway associated with the resource configuration.
resourceConfigurationGroupId (string) –
The ID of the parent resource configuration of type
GROUP.type (string) –
The type of resource configuration. A resource configuration can be one of the following types:
SINGLE - A single resource.
GROUP - A group of resources. You must create a group resource configuration before you create a child resource configuration.
CHILD - A single resource that is part of a group resource configuration.
ARN - An Amazon Web Services resource.
CIDR - A network segment, expressed as a range of IP addresses (a CIDR block). A consumer accesses the resources within the CIDR range through a
TunnelVPC endpoint. A CIDR resource configuration must be associated with a resource gateway whose DNS resolution is set toIN_VPC.
portRanges (list) –
The port range.
(string) –
protocol (string) –
The protocol.
status (string) –
The current status of the resource configuration.
resourceConfigurationDefinition (dict) –
Identifies the resource configuration in one of the following ways:
Amazon Resource Name (ARN) - Supported resource-types that are provisioned by Amazon Web Services services, such as RDS databases, can be identified by their ARN.
Domain name - Any domain name that is publicly resolvable.
IP address - For IPv4 and IPv6, only IP addresses in the VPC are supported.
Note
This is a Tagged Union structure. Only one of the following top level keys will be set:
dnsResource,ipResource,arnResource,cidrResource. If a client receives an unknown member it will setSDK_UNKNOWN_MEMBERas the top level key, which maps to the name or tag of the unknown member. The structure ofSDK_UNKNOWN_MEMBERis as follows:'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
dnsResource (dict) –
The DNS name of the resource.
domainName (string) –
The domain name of the resource.
ipAddressType (string) –
The type of IP address. Dualstack is currently not supported.
ipResource (dict) –
The IP resource.
ipAddress (string) –
The IP address of the IP resource.
arnResource (dict) –
The Amazon Resource Name (ARN) of the resource.
arn (string) –
The Amazon Resource Name (ARN) of the resource.
cidrResource (dict) –
The network segment for a resource configuration of type CIDR, specified as one or more CIDR ranges (
cidrRanges). Resources whose IP addresses fall within these ranges are reachable through aTunnelVPC endpoint.cidrRanges (list) –
The CIDR ranges of the network segment, for example,
10.0.0.0/16.(string) –
allowAssociationToShareableServiceNetwork (boolean) –
Specifies whether the resource configuration can be associated with a sharable service network.
createdAt (datetime) –
The date and time that the resource configuration was created, in ISO-8601 format.
failureReason (string) –
The reason that the request failed.
customDomainName (string) –
The custom domain name for your resource configuration.
domainVerificationId (string) –
The domain name verification ID.
groupDomain (string) –
(GROUP) The group domain for a group resource configuration. Any domains that you create for the child resource are subdomains of the group domain. Child resources inherit the verification status of the domain.
domainVerificationArn (string) –
The verification ID ARN
Exceptions