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(
    allowAssociationToShareableServiceNetwork=True|False,
    clientToken='string',
    name='string',
    portRanges=[
        'string',
    ],
    protocol='TCP',
    resourceConfigurationDefinition={
        'arnResource': {
            'arn': 'string'
        },
        'dnsResource': {
            'domainName': 'string',
            'ipAddressType': 'IPV4'|'IPV6'|'DUALSTACK'
        },
        'ipResource': {
            'ipAddress': 'string'
        }
    },
    resourceConfigurationGroupIdentifier='string',
    resourceGatewayIdentifier='string',
    tags={
        'string': 'string'
    },
    type='GROUP'|'CHILD'|'SINGLE'|'ARN'
)
Parameters:
  • allowAssociationToShareableServiceNetwork (boolean) – (SINGLE, GROUP, ARN) Specifies whether the resource configuration can be associated with a sharable service network. The default is false.

  • 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.

  • 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.

  • portRanges (list) –

    (SINGLE, GROUP, CHILD) The TCP 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).

    • (string) –

  • protocol (string) – (SINGLE, GROUP) The protocol accepted by the resource configuration.

  • resourceConfigurationDefinition (dict) –

    (SINGLE, CHILD, ARN) The resource configuration.

    Note

    This is a Tagged Union structure. Only one of the following top level keys can be set: arnResource, dnsResource, ipResource.

    • arnResource (dict) –

      The Amazon Resource Name (ARN) of the resource.

      • arn (string) –

        The Amazon Resource Name (ARN) of the resource.

    • dnsResource (dict) –

      The DNS name of the resource.

      • domainName (string) –

        The domain name of the resource.

      • ipAddressType (string) –

        The type of IP address.

    • ipResource (dict) –

      The IP resource.

      • ipAddress (string) –

        The IP address of the IP resource.

  • resourceConfigurationGroupIdentifier (string) – (CHILD) The ID or ARN of the parent resource configuration (type is GROUP). This is used to associate a child resource configuration with a group resource configuration.

  • resourceGatewayIdentifier (string) – (SINGLE, GROUP, ARN) 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.

  • 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: _ . : / = + - @

  • type (string) –

    [REQUIRED]

    The type of resource configuration.

    • 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.

Return type:

dict

Returns:

Response Syntax

{
    'allowAssociationToShareableServiceNetwork': True|False,
    'arn': 'string',
    'createdAt': datetime(2015, 1, 1),
    'failureReason': 'string',
    'id': 'string',
    'name': 'string',
    'portRanges': [
        'string',
    ],
    'protocol': 'TCP',
    'resourceConfigurationDefinition': {
        'arnResource': {
            'arn': 'string'
        },
        'dnsResource': {
            'domainName': 'string',
            'ipAddressType': 'IPV4'|'IPV6'|'DUALSTACK'
        },
        'ipResource': {
            'ipAddress': 'string'
        }
    },
    'resourceConfigurationGroupId': 'string',
    'resourceGatewayId': 'string',
    'status': 'ACTIVE'|'CREATE_IN_PROGRESS'|'UPDATE_IN_PROGRESS'|'DELETE_IN_PROGRESS'|'CREATE_FAILED'|'UPDATE_FAILED'|'DELETE_FAILED',
    'type': 'GROUP'|'CHILD'|'SINGLE'|'ARN'
}

Response Structure

  • (dict) –

    • allowAssociationToShareableServiceNetwork (boolean) –

      Specifies whether the resource configuration can be associated with a sharable service network.

    • arn (string) –

      The Amazon Resource Name (ARN) of the resource configuration.

    • createdAt (datetime) –

      The date and time that the resource configuration was created, in ISO-8601 format.

    • failureReason (string) –

      The reason that the request failed.

    • id (string) –

      The ID of the resource configuration.

    • name (string) –

      The name of the resource configuration.

    • portRanges (list) –

      The port range.

      • (string) –

    • protocol (string) –

      The protocol.

    • resourceConfigurationDefinition (dict) –

      The resource configuration.

      Note

      This is a Tagged Union structure. Only one of the following top level keys will be set: arnResource, dnsResource, ipResource. If a client receives an unknown member it will set SDK_UNKNOWN_MEMBER as the top level key, which maps to the name or tag of the unknown member. The structure of SDK_UNKNOWN_MEMBER is as follows:

      'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
      
      • arnResource (dict) –

        The Amazon Resource Name (ARN) of the resource.

        • arn (string) –

          The Amazon Resource Name (ARN) of the resource.

      • dnsResource (dict) –

        The DNS name of the resource.

        • domainName (string) –

          The domain name of the resource.

        • ipAddressType (string) –

          The type of IP address.

      • ipResource (dict) –

        The IP resource.

        • ipAddress (string) –

          The IP address of the IP resource.

    • resourceConfigurationGroupId (string) –

      The ID of the parent resource configuration (type is GROUP).

    • resourceGatewayId (string) –

      The ID of the resource gateway associated with the resource configuration.

    • status (string) –

      The current status of the resource configuration.

    • type (string) –

      The type of resource configuration.

Exceptions