create_resource_configuration
¶
create_resource_configuration(
name: ResourceConfigurationName,
type: ResourceConfigurationType,
*,
config_overrides: Optional[VPCLatticeClientConfig] = None,
port_ranges: Optional[PortRangeList] = None,
protocol: Optional[ProtocolType] = None,
resource_gateway_identifier: Optional[ResourceGatewayIdentifier] = None,
resource_configuration_group_identifier: Optional[
ResourceConfigurationIdentifier
] = None,
resource_configuration_definition: Optional[ResourceConfigurationDefinition] = None,
allow_association_to_shareable_service_network: Optional[Boolean] = None,
custom_domain_name: Optional[DomainName] = None,
group_domain: Optional[DomainName] = None,
domain_verification_identifier: Optional[DomainVerificationIdentifier] = None,
client_token: Optional[ClientToken] = None,
tags: Optional[TagMap] = None,
) -> CreateResourceConfigurationResponse
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.
Parameters:
-
name(ResourceConfigurationName) –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(ResourceConfigurationType) –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.
-
-
port_ranges(Optional[PortRangeList], default:None) –(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.
-
protocol(Optional[ProtocolType], default:None) –(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. -
resource_gateway_identifier(Optional[ResourceGatewayIdentifier], default:None) –(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. -
resource_configuration_group_identifier(Optional[ResourceConfigurationIdentifier], default:None) –(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. -
resource_configuration_definition(Optional[ResourceConfigurationDefinition], default:None) –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.
-
-
allow_association_to_shareable_service_network(Optional[Boolean], default:None) –(SINGLE, GROUP, ARN) Specifies whether the resource configuration can be associated with a sharable service network. The default is false.
-
custom_domain_name(Optional[DomainName], default:None) –A custom domain name for your resource configuration. Additionally, provide a DomainVerificationID to prove your ownership of a domain.
-
group_domain(Optional[DomainName], default:None) –(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.
-
domain_verification_identifier(Optional[DomainVerificationIdentifier], default:None) –The domain verification ID of your verified custom domain name. If you don't provide an ID, you must configure the DNS settings yourself.
-
client_token(Optional[ClientToken], default:None) –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.
-
tags(Optional[TagMap], default:None) –The tags for the resource configuration.
Raises:
-
AccessDeniedException–The user does not have sufficient access to perform this action.
-
ConflictException–The request conflicts with the current state of the resource. Updating or deleting a resource can cause an inconsistent state.
-
InternalServerException–An unexpected error occurred while processing the request.
-
ResourceNotFoundException–The request references a resource that does not exist.
-
ServiceQuotaExceededException–The request would cause a service quota to be exceeded.
-
ThrottlingException–The limit on the number of requests per second was exceeded.
-
ValidationException–The input does not satisfy the constraints specified by an Amazon Web Services service.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_vpc_lattice/_services/vpc_lattice.py
1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 | |