AmazonApiGatewayV2

2025/06/03 - AmazonApiGatewayV2 - 5 new4 updated api methods

Changes  Adds support to create routing rules and set the routing mode for a custom domain name.

ListRoutingRules (new) Link ¶

Lists routing rules.

See also: AWS API Documentation

Request Syntax

client.list_routing_rules(
    DomainName='string',
    DomainNameId='string',
    MaxResults=123,
    NextToken='string'
)
type DomainName:

string

param DomainName:

[REQUIRED]

The domain name.

type DomainNameId:

string

param DomainNameId:

The domain name ID.

type MaxResults:

integer

param MaxResults:

The maximum number of elements to be returned for this resource.

type NextToken:

string

param NextToken:

The next page of elements from this collection. Not valid for the last element of the collection.

rtype:

dict

returns:

Response Syntax

{
    'NextToken': 'string',
    'RoutingRules': [
        {
            'Actions': [
                {
                    'InvokeApi': {
                        'ApiId': 'string',
                        'Stage': 'string',
                        'StripBasePath': True|False
                    }
                },
            ],
            'Conditions': [
                {
                    'MatchBasePaths': {
                        'AnyOf': [
                            'string',
                        ]
                    },
                    'MatchHeaders': {
                        'AnyOf': [
                            {
                                'Header': 'string',
                                'ValueGlob': 'string'
                            },
                        ]
                    }
                },
            ],
            'Priority': 123,
            'RoutingRuleArn': 'string',
            'RoutingRuleId': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    Success

    • NextToken (string) --

      The next page of elements from this collection. Not valid for the last element of the collection.

    • RoutingRules (list) --

      The routing rules.

      • (dict) --

        Represents a routing rule.

        • Actions (list) --

          The routing rule action.

          • (dict) --

            The routing rule action.

            • InvokeApi (dict) --

              Represents an InvokeApi action.

              • ApiId (string) --

                The identifier.

              • Stage (string) --

                A string with a length between [1-128].

              • StripBasePath (boolean) --

                The strip base path setting.

        • Conditions (list) --

          The routing rule condition.

          • (dict) --

            Represents a routing rule condition.

            • MatchBasePaths (dict) --

              The base path to be matched.

              • AnyOf (list) -- The string of the case sensitive base path to be matched.

                • (string) --

                  After evaluating a selection expression, the result is compared against one or more selection keys to find a matching key. See Selection Expressions for a list of expressions and each expression's associated selection key type.

            • MatchHeaders (dict) --

              The headers to be matched.

              • AnyOf (list) --

                The header name and header value glob to be matched. The matchHeaders condition is matched if any of the header name and header value globs are matched.

                • (dict) --

                  Represents a MatchHeaderValue.

                  • Header (string) --

                    After evaluating a selection expression, the result is compared against one or more selection keys to find a matching key. See Selection Expressions for a list of expressions and each expression's associated selection key type.

                  • ValueGlob (string) --

                    An expression used to extract information at runtime. See Selection Expressions for more information.

        • Priority (integer) --

          The routing rule priority.

        • RoutingRuleArn (string) --

          The routing rule ARN.

        • RoutingRuleId (string) --

          The routing rule ID.

GetRoutingRule (new) Link ¶

Gets a routing rule.

See also: AWS API Documentation

Request Syntax

client.get_routing_rule(
    DomainName='string',
    DomainNameId='string',
    RoutingRuleId='string'
)
type DomainName:

string

param DomainName:

[REQUIRED]

The domain name.

type DomainNameId:

string

param DomainNameId:

The domain name ID.

type RoutingRuleId:

string

param RoutingRuleId:

[REQUIRED]

The routing rule ID.

rtype:

dict

returns:

Response Syntax

{
    'Actions': [
        {
            'InvokeApi': {
                'ApiId': 'string',
                'Stage': 'string',
                'StripBasePath': True|False
            }
        },
    ],
    'Conditions': [
        {
            'MatchBasePaths': {
                'AnyOf': [
                    'string',
                ]
            },
            'MatchHeaders': {
                'AnyOf': [
                    {
                        'Header': 'string',
                        'ValueGlob': 'string'
                    },
                ]
            }
        },
    ],
    'Priority': 123,
    'RoutingRuleArn': 'string',
    'RoutingRuleId': 'string'
}

Response Structure

  • (dict) --

    Success

    • Actions (list) --

      The resulting action based on matching a routing rules condition. Only InvokeApi is supported.

      • (dict) --

        The routing rule action.

        • InvokeApi (dict) --

          Represents an InvokeApi action.

          • ApiId (string) --

            The identifier.

          • Stage (string) --

            A string with a length between [1-128].

          • StripBasePath (boolean) --

            The strip base path setting.

    • Conditions (list) --

      The conditions of the routing rule.

      • (dict) --

        Represents a routing rule condition.

        • MatchBasePaths (dict) --

          The base path to be matched.

          • AnyOf (list) -- The string of the case sensitive base path to be matched.

            • (string) --

              After evaluating a selection expression, the result is compared against one or more selection keys to find a matching key. See Selection Expressions for a list of expressions and each expression's associated selection key type.

        • MatchHeaders (dict) --

          The headers to be matched.

          • AnyOf (list) --

            The header name and header value glob to be matched. The matchHeaders condition is matched if any of the header name and header value globs are matched.

            • (dict) --

              Represents a MatchHeaderValue.

              • Header (string) --

                After evaluating a selection expression, the result is compared against one or more selection keys to find a matching key. See Selection Expressions for a list of expressions and each expression's associated selection key type.

              • ValueGlob (string) --

                An expression used to extract information at runtime. See Selection Expressions for more information.

    • Priority (integer) --

      The order in which API Gateway evaluates a rule. Priority is evaluated from the lowest value to the highest value.

    • RoutingRuleArn (string) --

      The routing rule ARN.

    • RoutingRuleId (string) --

      The routing rule ID.

DeleteRoutingRule (new) Link ¶

Deletes a routing rule.

See also: AWS API Documentation

Request Syntax

client.delete_routing_rule(
    DomainName='string',
    DomainNameId='string',
    RoutingRuleId='string'
)
type DomainName:

string

param DomainName:

[REQUIRED]

The domain name.

type DomainNameId:

string

param DomainNameId:

The domain name ID.

type RoutingRuleId:

string

param RoutingRuleId:

[REQUIRED]

The routing rule ID.

returns:

None

PutRoutingRule (new) Link ¶

Updates a routing rule.

See also: AWS API Documentation

Request Syntax

client.put_routing_rule(
    Actions=[
        {
            'InvokeApi': {
                'ApiId': 'string',
                'Stage': 'string',
                'StripBasePath': True|False
            }
        },
    ],
    Conditions=[
        {
            'MatchBasePaths': {
                'AnyOf': [
                    'string',
                ]
            },
            'MatchHeaders': {
                'AnyOf': [
                    {
                        'Header': 'string',
                        'ValueGlob': 'string'
                    },
                ]
            }
        },
    ],
    DomainName='string',
    DomainNameId='string',
    Priority=123,
    RoutingRuleId='string'
)
type Actions:

list

param Actions:

[REQUIRED]

The routing rule action.

  • (dict) --

    The routing rule action.

    • InvokeApi (dict) -- [REQUIRED]

      Represents an InvokeApi action.

      • ApiId (string) -- [REQUIRED]

        The identifier.

      • Stage (string) -- [REQUIRED]

        A string with a length between [1-128].

      • StripBasePath (boolean) --

        The strip base path setting.

type Conditions:

list

param Conditions:

[REQUIRED]

The routing rule condition.

  • (dict) --

    Represents a routing rule condition.

    • MatchBasePaths (dict) --

      The base path to be matched.

      • AnyOf (list) -- [REQUIRED] The string of the case sensitive base path to be matched.

        • (string) --

          After evaluating a selection expression, the result is compared against one or more selection keys to find a matching key. See Selection Expressions for a list of expressions and each expression's associated selection key type.

    • MatchHeaders (dict) --

      The headers to be matched.

      • AnyOf (list) -- [REQUIRED]

        The header name and header value glob to be matched. The matchHeaders condition is matched if any of the header name and header value globs are matched.

        • (dict) --

          Represents a MatchHeaderValue.

          • Header (string) -- [REQUIRED]

            After evaluating a selection expression, the result is compared against one or more selection keys to find a matching key. See Selection Expressions for a list of expressions and each expression's associated selection key type.

          • ValueGlob (string) -- [REQUIRED]

            An expression used to extract information at runtime. See Selection Expressions for more information.

type DomainName:

string

param DomainName:

[REQUIRED]

The domain name.

type DomainNameId:

string

param DomainNameId:

The domain name ID.

type Priority:

integer

param Priority:

[REQUIRED]

The routing rule priority.

type RoutingRuleId:

string

param RoutingRuleId:

[REQUIRED]

The routing rule ID.

rtype:

dict

returns:

Response Syntax

{
    'Actions': [
        {
            'InvokeApi': {
                'ApiId': 'string',
                'Stage': 'string',
                'StripBasePath': True|False
            }
        },
    ],
    'Conditions': [
        {
            'MatchBasePaths': {
                'AnyOf': [
                    'string',
                ]
            },
            'MatchHeaders': {
                'AnyOf': [
                    {
                        'Header': 'string',
                        'ValueGlob': 'string'
                    },
                ]
            }
        },
    ],
    'Priority': 123,
    'RoutingRuleArn': 'string',
    'RoutingRuleId': 'string'
}

Response Structure

  • (dict) --

    Success

    • Actions (list) --

      The routing rule action.

      • (dict) --

        The routing rule action.

        • InvokeApi (dict) --

          Represents an InvokeApi action.

          • ApiId (string) --

            The identifier.

          • Stage (string) --

            A string with a length between [1-128].

          • StripBasePath (boolean) --

            The strip base path setting.

    • Conditions (list) --

      The conditions of the routing rule.

      • (dict) --

        Represents a routing rule condition.

        • MatchBasePaths (dict) --

          The base path to be matched.

          • AnyOf (list) -- The string of the case sensitive base path to be matched.

            • (string) --

              After evaluating a selection expression, the result is compared against one or more selection keys to find a matching key. See Selection Expressions for a list of expressions and each expression's associated selection key type.

        • MatchHeaders (dict) --

          The headers to be matched.

          • AnyOf (list) --

            The header name and header value glob to be matched. The matchHeaders condition is matched if any of the header name and header value globs are matched.

            • (dict) --

              Represents a MatchHeaderValue.

              • Header (string) --

                After evaluating a selection expression, the result is compared against one or more selection keys to find a matching key. See Selection Expressions for a list of expressions and each expression's associated selection key type.

              • ValueGlob (string) --

                An expression used to extract information at runtime. See Selection Expressions for more information.

    • Priority (integer) --

      The routing rule priority.

    • RoutingRuleArn (string) --

      The routing rule ARN.

    • RoutingRuleId (string) --

      The routing rule ID.

CreateRoutingRule (new) Link ¶

Creates a RoutingRule

See also: AWS API Documentation

Request Syntax

client.create_routing_rule(
    Actions=[
        {
            'InvokeApi': {
                'ApiId': 'string',
                'Stage': 'string',
                'StripBasePath': True|False
            }
        },
    ],
    Conditions=[
        {
            'MatchBasePaths': {
                'AnyOf': [
                    'string',
                ]
            },
            'MatchHeaders': {
                'AnyOf': [
                    {
                        'Header': 'string',
                        'ValueGlob': 'string'
                    },
                ]
            }
        },
    ],
    DomainName='string',
    DomainNameId='string',
    Priority=123
)
type Actions:

list

param Actions:

[REQUIRED]

Represents a routing rule action. The only supported action is invokeApi.

  • (dict) --

    The routing rule action.

    • InvokeApi (dict) -- [REQUIRED]

      Represents an InvokeApi action.

      • ApiId (string) -- [REQUIRED]

        The identifier.

      • Stage (string) -- [REQUIRED]

        A string with a length between [1-128].

      • StripBasePath (boolean) --

        The strip base path setting.

type Conditions:

list

param Conditions:

[REQUIRED]

Represents a condition. Conditions can contain up to two matchHeaders conditions and one matchBasePaths conditions. API Gateway evaluates header conditions and base path conditions together. You can only use AND between header and base path conditions.

  • (dict) --

    Represents a routing rule condition.

    • MatchBasePaths (dict) --

      The base path to be matched.

      • AnyOf (list) -- [REQUIRED] The string of the case sensitive base path to be matched.

        • (string) --

          After evaluating a selection expression, the result is compared against one or more selection keys to find a matching key. See Selection Expressions for a list of expressions and each expression's associated selection key type.

    • MatchHeaders (dict) --

      The headers to be matched.

      • AnyOf (list) -- [REQUIRED]

        The header name and header value glob to be matched. The matchHeaders condition is matched if any of the header name and header value globs are matched.

        • (dict) --

          Represents a MatchHeaderValue.

          • Header (string) -- [REQUIRED]

            After evaluating a selection expression, the result is compared against one or more selection keys to find a matching key. See Selection Expressions for a list of expressions and each expression's associated selection key type.

          • ValueGlob (string) -- [REQUIRED]

            An expression used to extract information at runtime. See Selection Expressions for more information.

type DomainName:

string

param DomainName:

[REQUIRED]

The domain name.

type DomainNameId:

string

param DomainNameId:

The domain name ID.

type Priority:

integer

param Priority:

[REQUIRED] Represents the priority of the routing rule.

rtype:

dict

returns:

Response Syntax

{
    'Actions': [
        {
            'InvokeApi': {
                'ApiId': 'string',
                'Stage': 'string',
                'StripBasePath': True|False
            }
        },
    ],
    'Conditions': [
        {
            'MatchBasePaths': {
                'AnyOf': [
                    'string',
                ]
            },
            'MatchHeaders': {
                'AnyOf': [
                    {
                        'Header': 'string',
                        'ValueGlob': 'string'
                    },
                ]
            }
        },
    ],
    'Priority': 123,
    'RoutingRuleArn': 'string',
    'RoutingRuleId': 'string'
}

Response Structure

  • (dict) --

    The request has succeeded and has resulted in the creation of a resource.

    • Actions (list) --

      Represents a routing rule action. The only supported action is invokeApi.

      • (dict) --

        The routing rule action.

        • InvokeApi (dict) --

          Represents an InvokeApi action.

          • ApiId (string) --

            The identifier.

          • Stage (string) --

            A string with a length between [1-128].

          • StripBasePath (boolean) --

            The strip base path setting.

    • Conditions (list) --

      Represents a condition. Conditions can contain up to two matchHeaders conditions and one matchBasePaths conditions. API Gateway evaluates header conditions and base path conditions together. You can only use AND between header and base path conditions.

      • (dict) --

        Represents a routing rule condition.

        • MatchBasePaths (dict) --

          The base path to be matched.

          • AnyOf (list) -- The string of the case sensitive base path to be matched.

            • (string) --

              After evaluating a selection expression, the result is compared against one or more selection keys to find a matching key. See Selection Expressions for a list of expressions and each expression's associated selection key type.

        • MatchHeaders (dict) --

          The headers to be matched.

          • AnyOf (list) --

            The header name and header value glob to be matched. The matchHeaders condition is matched if any of the header name and header value globs are matched.

            • (dict) --

              Represents a MatchHeaderValue.

              • Header (string) --

                After evaluating a selection expression, the result is compared against one or more selection keys to find a matching key. See Selection Expressions for a list of expressions and each expression's associated selection key type.

              • ValueGlob (string) --

                An expression used to extract information at runtime. See Selection Expressions for more information.

    • Priority (integer) --

      Represents the priority of the routing rule.

    • RoutingRuleArn (string) --

      The ARN of the domain name.

    • RoutingRuleId (string) --

      The routing rule ID.

CreateDomainName (updated) Link ¶
Changes (request, response)
Request
{'RoutingMode': 'API_MAPPING_ONLY | ROUTING_RULE_ONLY | '
                'ROUTING_RULE_THEN_API_MAPPING'}
Response
{'DomainNameArn': 'string',
 'RoutingMode': 'API_MAPPING_ONLY | ROUTING_RULE_ONLY | '
                'ROUTING_RULE_THEN_API_MAPPING'}

Creates a domain name.

See also: AWS API Documentation

Request Syntax

client.create_domain_name(
    DomainName='string',
    DomainNameConfigurations=[
        {
            'ApiGatewayDomainName': 'string',
            'CertificateArn': 'string',
            'CertificateName': 'string',
            'CertificateUploadDate': datetime(2015, 1, 1),
            'DomainNameStatus': 'AVAILABLE'|'UPDATING'|'PENDING_CERTIFICATE_REIMPORT'|'PENDING_OWNERSHIP_VERIFICATION',
            'DomainNameStatusMessage': 'string',
            'EndpointType': 'REGIONAL'|'EDGE',
            'HostedZoneId': 'string',
            'IpAddressType': 'ipv4'|'dualstack',
            'SecurityPolicy': 'TLS_1_0'|'TLS_1_2',
            'OwnershipVerificationCertificateArn': 'string'
        },
    ],
    MutualTlsAuthentication={
        'TruststoreUri': 'string',
        'TruststoreVersion': 'string'
    },
    RoutingMode='API_MAPPING_ONLY'|'ROUTING_RULE_ONLY'|'ROUTING_RULE_THEN_API_MAPPING',
    Tags={
        'string': 'string'
    }
)
type DomainName:

string

param DomainName:

[REQUIRED]

The domain name.

type DomainNameConfigurations:

list

param DomainNameConfigurations:

The domain name configurations.

  • (dict) --

    The domain name configuration.

    • ApiGatewayDomainName (string) --

      A domain name for the API.

    • CertificateArn (string) --

      An AWS-managed certificate that will be used by the edge-optimized endpoint for this domain name. AWS Certificate Manager is the only supported source.

    • CertificateName (string) --

      The user-friendly name of the certificate that will be used by the edge-optimized endpoint for this domain name.

    • CertificateUploadDate (datetime) --

      The timestamp when the certificate that was used by edge-optimized endpoint for this domain name was uploaded.

    • DomainNameStatus (string) --

      The status of the domain name migration. The valid values are AVAILABLE, UPDATING, PENDING_CERTIFICATE_REIMPORT, and PENDING_OWNERSHIP_VERIFICATION. If the status is UPDATING, the domain cannot be modified further until the existing operation is complete. If it is AVAILABLE, the domain can be updated.

    • DomainNameStatusMessage (string) --

      An optional text message containing detailed information about status of the domain name migration.

    • EndpointType (string) --

      The endpoint type.

    • HostedZoneId (string) --

      The Amazon Route 53 Hosted Zone ID of the endpoint.

    • IpAddressType (string) --

      The IP address types that can invoke the domain name. Use ipv4 to allow only IPv4 addresses to invoke your domain name, or use dualstack to allow both IPv4 and IPv6 addresses to invoke your domain name.

    • SecurityPolicy (string) --

      The Transport Layer Security (TLS) version of the security policy for this domain name. The valid values are TLS_1_0 and TLS_1_2.

    • OwnershipVerificationCertificateArn (string) --

      The ARN of the public certificate issued by ACM to validate ownership of your custom domain. Only required when configuring mutual TLS and using an ACM imported or private CA certificate ARN as the regionalCertificateArn

type MutualTlsAuthentication:

dict

param MutualTlsAuthentication:

The mutual TLS authentication configuration for a custom domain name.

  • TruststoreUri (string) --

    An Amazon S3 URL that specifies the truststore for mutual TLS authentication, for example, s3://bucket-name/key-name. The truststore can contain certificates from public or private certificate authorities. To update the truststore, upload a new version to S3, and then update your custom domain name to use the new version. To update the truststore, you must have permissions to access the S3 object.

  • TruststoreVersion (string) --

    The version of the S3 object that contains your truststore. To specify a version, you must have versioning enabled for the S3 bucket.

type RoutingMode:

string

param RoutingMode:

The routing mode.

type Tags:

dict

param Tags:

The collection of tags associated with a domain name.

  • (string) --

    • (string) --

      A string with a length between [0-1600].

rtype:

dict

returns:

Response Syntax

{
    'ApiMappingSelectionExpression': 'string',
    'DomainName': 'string',
    'DomainNameArn': 'string',
    'DomainNameConfigurations': [
        {
            'ApiGatewayDomainName': 'string',
            'CertificateArn': 'string',
            'CertificateName': 'string',
            'CertificateUploadDate': datetime(2015, 1, 1),
            'DomainNameStatus': 'AVAILABLE'|'UPDATING'|'PENDING_CERTIFICATE_REIMPORT'|'PENDING_OWNERSHIP_VERIFICATION',
            'DomainNameStatusMessage': 'string',
            'EndpointType': 'REGIONAL'|'EDGE',
            'HostedZoneId': 'string',
            'IpAddressType': 'ipv4'|'dualstack',
            'SecurityPolicy': 'TLS_1_0'|'TLS_1_2',
            'OwnershipVerificationCertificateArn': 'string'
        },
    ],
    'MutualTlsAuthentication': {
        'TruststoreUri': 'string',
        'TruststoreVersion': 'string',
        'TruststoreWarnings': [
            'string',
        ]
    },
    'RoutingMode': 'API_MAPPING_ONLY'|'ROUTING_RULE_ONLY'|'ROUTING_RULE_THEN_API_MAPPING',
    'Tags': {
        'string': 'string'
    }
}

Response Structure

  • (dict) --

    The request has succeeded and has resulted in the creation of a resource.

    • ApiMappingSelectionExpression (string) --

      The API mapping selection expression.

    • DomainName (string) --

      The name of the DomainName resource.

    • DomainNameArn (string) --

      Represents an Amazon Resource Name (ARN).

    • DomainNameConfigurations (list) --

      The domain name configurations.

      • (dict) --

        The domain name configuration.

        • ApiGatewayDomainName (string) --

          A domain name for the API.

        • CertificateArn (string) --

          An AWS-managed certificate that will be used by the edge-optimized endpoint for this domain name. AWS Certificate Manager is the only supported source.

        • CertificateName (string) --

          The user-friendly name of the certificate that will be used by the edge-optimized endpoint for this domain name.

        • CertificateUploadDate (datetime) --

          The timestamp when the certificate that was used by edge-optimized endpoint for this domain name was uploaded.

        • DomainNameStatus (string) --

          The status of the domain name migration. The valid values are AVAILABLE, UPDATING, PENDING_CERTIFICATE_REIMPORT, and PENDING_OWNERSHIP_VERIFICATION. If the status is UPDATING, the domain cannot be modified further until the existing operation is complete. If it is AVAILABLE, the domain can be updated.

        • DomainNameStatusMessage (string) --

          An optional text message containing detailed information about status of the domain name migration.

        • EndpointType (string) --

          The endpoint type.

        • HostedZoneId (string) --

          The Amazon Route 53 Hosted Zone ID of the endpoint.

        • IpAddressType (string) --

          The IP address types that can invoke the domain name. Use ipv4 to allow only IPv4 addresses to invoke your domain name, or use dualstack to allow both IPv4 and IPv6 addresses to invoke your domain name.

        • SecurityPolicy (string) --

          The Transport Layer Security (TLS) version of the security policy for this domain name. The valid values are TLS_1_0 and TLS_1_2.

        • OwnershipVerificationCertificateArn (string) --

          The ARN of the public certificate issued by ACM to validate ownership of your custom domain. Only required when configuring mutual TLS and using an ACM imported or private CA certificate ARN as the regionalCertificateArn

    • MutualTlsAuthentication (dict) --

      The mutual TLS authentication configuration for a custom domain name.

      • TruststoreUri (string) --

        An Amazon S3 URL that specifies the truststore for mutual TLS authentication, for example, s3://bucket-name/key-name. The truststore can contain certificates from public or private certificate authorities. To update the truststore, upload a new version to S3, and then update your custom domain name to use the new version. To update the truststore, you must have permissions to access the S3 object.

      • TruststoreVersion (string) --

        The version of the S3 object that contains your truststore. To specify a version, you must have versioning enabled for the S3 bucket.

      • TruststoreWarnings (list) --

        A list of warnings that API Gateway returns while processing your truststore. Invalid certificates produce warnings. Mutual TLS is still enabled, but some clients might not be able to access your API. To resolve warnings, upload a new truststore to S3, and then update you domain name to use the new version.

        • (string) --

    • RoutingMode (string) --

      The routing mode.

    • Tags (dict) --

      The collection of tags associated with a domain name.

      • (string) --

        • (string) --

          A string with a length between [0-1600].

GetDomainName (updated) Link ¶
Changes (response)
{'DomainNameArn': 'string',
 'RoutingMode': 'API_MAPPING_ONLY | ROUTING_RULE_ONLY | '
                'ROUTING_RULE_THEN_API_MAPPING'}

Gets a domain name.

See also: AWS API Documentation

Request Syntax

client.get_domain_name(
    DomainName='string'
)
type DomainName:

string

param DomainName:

[REQUIRED]

The domain name.

rtype:

dict

returns:

Response Syntax

{
    'ApiMappingSelectionExpression': 'string',
    'DomainName': 'string',
    'DomainNameArn': 'string',
    'DomainNameConfigurations': [
        {
            'ApiGatewayDomainName': 'string',
            'CertificateArn': 'string',
            'CertificateName': 'string',
            'CertificateUploadDate': datetime(2015, 1, 1),
            'DomainNameStatus': 'AVAILABLE'|'UPDATING'|'PENDING_CERTIFICATE_REIMPORT'|'PENDING_OWNERSHIP_VERIFICATION',
            'DomainNameStatusMessage': 'string',
            'EndpointType': 'REGIONAL'|'EDGE',
            'HostedZoneId': 'string',
            'IpAddressType': 'ipv4'|'dualstack',
            'SecurityPolicy': 'TLS_1_0'|'TLS_1_2',
            'OwnershipVerificationCertificateArn': 'string'
        },
    ],
    'MutualTlsAuthentication': {
        'TruststoreUri': 'string',
        'TruststoreVersion': 'string',
        'TruststoreWarnings': [
            'string',
        ]
    },
    'RoutingMode': 'API_MAPPING_ONLY'|'ROUTING_RULE_ONLY'|'ROUTING_RULE_THEN_API_MAPPING',
    'Tags': {
        'string': 'string'
    }
}

Response Structure

  • (dict) --

    Success

    • ApiMappingSelectionExpression (string) --

      The API mapping selection expression.

    • DomainName (string) --

      The name of the DomainName resource.

    • DomainNameArn (string) --

      Represents an Amazon Resource Name (ARN).

    • DomainNameConfigurations (list) --

      The domain name configurations.

      • (dict) --

        The domain name configuration.

        • ApiGatewayDomainName (string) --

          A domain name for the API.

        • CertificateArn (string) --

          An AWS-managed certificate that will be used by the edge-optimized endpoint for this domain name. AWS Certificate Manager is the only supported source.

        • CertificateName (string) --

          The user-friendly name of the certificate that will be used by the edge-optimized endpoint for this domain name.

        • CertificateUploadDate (datetime) --

          The timestamp when the certificate that was used by edge-optimized endpoint for this domain name was uploaded.

        • DomainNameStatus (string) --

          The status of the domain name migration. The valid values are AVAILABLE, UPDATING, PENDING_CERTIFICATE_REIMPORT, and PENDING_OWNERSHIP_VERIFICATION. If the status is UPDATING, the domain cannot be modified further until the existing operation is complete. If it is AVAILABLE, the domain can be updated.

        • DomainNameStatusMessage (string) --

          An optional text message containing detailed information about status of the domain name migration.

        • EndpointType (string) --

          The endpoint type.

        • HostedZoneId (string) --

          The Amazon Route 53 Hosted Zone ID of the endpoint.

        • IpAddressType (string) --

          The IP address types that can invoke the domain name. Use ipv4 to allow only IPv4 addresses to invoke your domain name, or use dualstack to allow both IPv4 and IPv6 addresses to invoke your domain name.

        • SecurityPolicy (string) --

          The Transport Layer Security (TLS) version of the security policy for this domain name. The valid values are TLS_1_0 and TLS_1_2.

        • OwnershipVerificationCertificateArn (string) --

          The ARN of the public certificate issued by ACM to validate ownership of your custom domain. Only required when configuring mutual TLS and using an ACM imported or private CA certificate ARN as the regionalCertificateArn

    • MutualTlsAuthentication (dict) --

      The mutual TLS authentication configuration for a custom domain name.

      • TruststoreUri (string) --

        An Amazon S3 URL that specifies the truststore for mutual TLS authentication, for example, s3://bucket-name/key-name. The truststore can contain certificates from public or private certificate authorities. To update the truststore, upload a new version to S3, and then update your custom domain name to use the new version. To update the truststore, you must have permissions to access the S3 object.

      • TruststoreVersion (string) --

        The version of the S3 object that contains your truststore. To specify a version, you must have versioning enabled for the S3 bucket.

      • TruststoreWarnings (list) --

        A list of warnings that API Gateway returns while processing your truststore. Invalid certificates produce warnings. Mutual TLS is still enabled, but some clients might not be able to access your API. To resolve warnings, upload a new truststore to S3, and then update you domain name to use the new version.

        • (string) --

    • RoutingMode (string) --

      The routing mode.

    • Tags (dict) --

      The collection of tags associated with a domain name.

      • (string) --

        • (string) --

          A string with a length between [0-1600].

GetDomainNames (updated) Link ¶
Changes (response)
{'Items': {'DomainNameArn': 'string',
           'RoutingMode': 'API_MAPPING_ONLY | ROUTING_RULE_ONLY | '
                          'ROUTING_RULE_THEN_API_MAPPING'}}

Gets the domain names for an AWS account.

See also: AWS API Documentation

Request Syntax

client.get_domain_names(
    MaxResults='string',
    NextToken='string'
)
type MaxResults:

string

param MaxResults:

The maximum number of elements to be returned for this resource.

type NextToken:

string

param NextToken:

The next page of elements from this collection. Not valid for the last element of the collection.

rtype:

dict

returns:

Response Syntax

{
    'Items': [
        {
            'ApiMappingSelectionExpression': 'string',
            'DomainName': 'string',
            'DomainNameArn': 'string',
            'DomainNameConfigurations': [
                {
                    'ApiGatewayDomainName': 'string',
                    'CertificateArn': 'string',
                    'CertificateName': 'string',
                    'CertificateUploadDate': datetime(2015, 1, 1),
                    'DomainNameStatus': 'AVAILABLE'|'UPDATING'|'PENDING_CERTIFICATE_REIMPORT'|'PENDING_OWNERSHIP_VERIFICATION',
                    'DomainNameStatusMessage': 'string',
                    'EndpointType': 'REGIONAL'|'EDGE',
                    'HostedZoneId': 'string',
                    'IpAddressType': 'ipv4'|'dualstack',
                    'SecurityPolicy': 'TLS_1_0'|'TLS_1_2',
                    'OwnershipVerificationCertificateArn': 'string'
                },
            ],
            'MutualTlsAuthentication': {
                'TruststoreUri': 'string',
                'TruststoreVersion': 'string',
                'TruststoreWarnings': [
                    'string',
                ]
            },
            'RoutingMode': 'API_MAPPING_ONLY'|'ROUTING_RULE_ONLY'|'ROUTING_RULE_THEN_API_MAPPING',
            'Tags': {
                'string': 'string'
            }
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    Success

    • Items (list) --

      The elements from this collection.

      • (dict) --

        Represents a domain name.

        • ApiMappingSelectionExpression (string) --

          The API mapping selection expression.

        • DomainName (string) --

          The name of the DomainName resource.

        • DomainNameArn (string) --

          Represents an Amazon Resource Name (ARN).

        • DomainNameConfigurations (list) --

          The domain name configurations.

          • (dict) --

            The domain name configuration.

            • ApiGatewayDomainName (string) --

              A domain name for the API.

            • CertificateArn (string) --

              An AWS-managed certificate that will be used by the edge-optimized endpoint for this domain name. AWS Certificate Manager is the only supported source.

            • CertificateName (string) --

              The user-friendly name of the certificate that will be used by the edge-optimized endpoint for this domain name.

            • CertificateUploadDate (datetime) --

              The timestamp when the certificate that was used by edge-optimized endpoint for this domain name was uploaded.

            • DomainNameStatus (string) --

              The status of the domain name migration. The valid values are AVAILABLE, UPDATING, PENDING_CERTIFICATE_REIMPORT, and PENDING_OWNERSHIP_VERIFICATION. If the status is UPDATING, the domain cannot be modified further until the existing operation is complete. If it is AVAILABLE, the domain can be updated.

            • DomainNameStatusMessage (string) --

              An optional text message containing detailed information about status of the domain name migration.

            • EndpointType (string) --

              The endpoint type.

            • HostedZoneId (string) --

              The Amazon Route 53 Hosted Zone ID of the endpoint.

            • IpAddressType (string) --

              The IP address types that can invoke the domain name. Use ipv4 to allow only IPv4 addresses to invoke your domain name, or use dualstack to allow both IPv4 and IPv6 addresses to invoke your domain name.

            • SecurityPolicy (string) --

              The Transport Layer Security (TLS) version of the security policy for this domain name. The valid values are TLS_1_0 and TLS_1_2.

            • OwnershipVerificationCertificateArn (string) --

              The ARN of the public certificate issued by ACM to validate ownership of your custom domain. Only required when configuring mutual TLS and using an ACM imported or private CA certificate ARN as the regionalCertificateArn

        • MutualTlsAuthentication (dict) --

          The mutual TLS authentication configuration for a custom domain name.

          • TruststoreUri (string) --

            An Amazon S3 URL that specifies the truststore for mutual TLS authentication, for example, s3://bucket-name/key-name. The truststore can contain certificates from public or private certificate authorities. To update the truststore, upload a new version to S3, and then update your custom domain name to use the new version. To update the truststore, you must have permissions to access the S3 object.

          • TruststoreVersion (string) --

            The version of the S3 object that contains your truststore. To specify a version, you must have versioning enabled for the S3 bucket.

          • TruststoreWarnings (list) --

            A list of warnings that API Gateway returns while processing your truststore. Invalid certificates produce warnings. Mutual TLS is still enabled, but some clients might not be able to access your API. To resolve warnings, upload a new truststore to S3, and then update you domain name to use the new version.

            • (string) --

        • RoutingMode (string) --

          The routing mode.

        • Tags (dict) --

          The collection of tags associated with a domain name.

          • (string) --

            • (string) --

              A string with a length between [0-1600].

    • NextToken (string) --

      The next page of elements from this collection. Not valid for the last element of the collection.

UpdateDomainName (updated) Link ¶
Changes (request, response)
Request
{'RoutingMode': 'API_MAPPING_ONLY | ROUTING_RULE_ONLY | '
                'ROUTING_RULE_THEN_API_MAPPING'}
Response
{'DomainNameArn': 'string',
 'RoutingMode': 'API_MAPPING_ONLY | ROUTING_RULE_ONLY | '
                'ROUTING_RULE_THEN_API_MAPPING'}

Updates a domain name.

See also: AWS API Documentation

Request Syntax

client.update_domain_name(
    DomainName='string',
    DomainNameConfigurations=[
        {
            'ApiGatewayDomainName': 'string',
            'CertificateArn': 'string',
            'CertificateName': 'string',
            'CertificateUploadDate': datetime(2015, 1, 1),
            'DomainNameStatus': 'AVAILABLE'|'UPDATING'|'PENDING_CERTIFICATE_REIMPORT'|'PENDING_OWNERSHIP_VERIFICATION',
            'DomainNameStatusMessage': 'string',
            'EndpointType': 'REGIONAL'|'EDGE',
            'HostedZoneId': 'string',
            'IpAddressType': 'ipv4'|'dualstack',
            'SecurityPolicy': 'TLS_1_0'|'TLS_1_2',
            'OwnershipVerificationCertificateArn': 'string'
        },
    ],
    MutualTlsAuthentication={
        'TruststoreUri': 'string',
        'TruststoreVersion': 'string'
    },
    RoutingMode='API_MAPPING_ONLY'|'ROUTING_RULE_ONLY'|'ROUTING_RULE_THEN_API_MAPPING'
)
type DomainName:

string

param DomainName:

[REQUIRED]

The domain name.

type DomainNameConfigurations:

list

param DomainNameConfigurations:

The domain name configurations.

  • (dict) --

    The domain name configuration.

    • ApiGatewayDomainName (string) --

      A domain name for the API.

    • CertificateArn (string) --

      An AWS-managed certificate that will be used by the edge-optimized endpoint for this domain name. AWS Certificate Manager is the only supported source.

    • CertificateName (string) --

      The user-friendly name of the certificate that will be used by the edge-optimized endpoint for this domain name.

    • CertificateUploadDate (datetime) --

      The timestamp when the certificate that was used by edge-optimized endpoint for this domain name was uploaded.

    • DomainNameStatus (string) --

      The status of the domain name migration. The valid values are AVAILABLE, UPDATING, PENDING_CERTIFICATE_REIMPORT, and PENDING_OWNERSHIP_VERIFICATION. If the status is UPDATING, the domain cannot be modified further until the existing operation is complete. If it is AVAILABLE, the domain can be updated.

    • DomainNameStatusMessage (string) --

      An optional text message containing detailed information about status of the domain name migration.

    • EndpointType (string) --

      The endpoint type.

    • HostedZoneId (string) --

      The Amazon Route 53 Hosted Zone ID of the endpoint.

    • IpAddressType (string) --

      The IP address types that can invoke the domain name. Use ipv4 to allow only IPv4 addresses to invoke your domain name, or use dualstack to allow both IPv4 and IPv6 addresses to invoke your domain name.

    • SecurityPolicy (string) --

      The Transport Layer Security (TLS) version of the security policy for this domain name. The valid values are TLS_1_0 and TLS_1_2.

    • OwnershipVerificationCertificateArn (string) --

      The ARN of the public certificate issued by ACM to validate ownership of your custom domain. Only required when configuring mutual TLS and using an ACM imported or private CA certificate ARN as the regionalCertificateArn

type MutualTlsAuthentication:

dict

param MutualTlsAuthentication:

The mutual TLS authentication configuration for a custom domain name.

  • TruststoreUri (string) --

    An Amazon S3 URL that specifies the truststore for mutual TLS authentication, for example, s3://bucket-name/key-name. The truststore can contain certificates from public or private certificate authorities. To update the truststore, upload a new version to S3, and then update your custom domain name to use the new version. To update the truststore, you must have permissions to access the S3 object.

  • TruststoreVersion (string) --

    The version of the S3 object that contains your truststore. To specify a version, you must have versioning enabled for the S3 bucket.

type RoutingMode:

string

param RoutingMode:

The routing mode.

rtype:

dict

returns:

Response Syntax

{
    'ApiMappingSelectionExpression': 'string',
    'DomainName': 'string',
    'DomainNameArn': 'string',
    'DomainNameConfigurations': [
        {
            'ApiGatewayDomainName': 'string',
            'CertificateArn': 'string',
            'CertificateName': 'string',
            'CertificateUploadDate': datetime(2015, 1, 1),
            'DomainNameStatus': 'AVAILABLE'|'UPDATING'|'PENDING_CERTIFICATE_REIMPORT'|'PENDING_OWNERSHIP_VERIFICATION',
            'DomainNameStatusMessage': 'string',
            'EndpointType': 'REGIONAL'|'EDGE',
            'HostedZoneId': 'string',
            'IpAddressType': 'ipv4'|'dualstack',
            'SecurityPolicy': 'TLS_1_0'|'TLS_1_2',
            'OwnershipVerificationCertificateArn': 'string'
        },
    ],
    'MutualTlsAuthentication': {
        'TruststoreUri': 'string',
        'TruststoreVersion': 'string',
        'TruststoreWarnings': [
            'string',
        ]
    },
    'RoutingMode': 'API_MAPPING_ONLY'|'ROUTING_RULE_ONLY'|'ROUTING_RULE_THEN_API_MAPPING',
    'Tags': {
        'string': 'string'
    }
}

Response Structure

  • (dict) --

    Success

    • ApiMappingSelectionExpression (string) --

      The API mapping selection expression.

    • DomainName (string) --

      The name of the DomainName resource.

    • DomainNameArn (string) --

      Represents an Amazon Resource Name (ARN).

    • DomainNameConfigurations (list) --

      The domain name configurations.

      • (dict) --

        The domain name configuration.

        • ApiGatewayDomainName (string) --

          A domain name for the API.

        • CertificateArn (string) --

          An AWS-managed certificate that will be used by the edge-optimized endpoint for this domain name. AWS Certificate Manager is the only supported source.

        • CertificateName (string) --

          The user-friendly name of the certificate that will be used by the edge-optimized endpoint for this domain name.

        • CertificateUploadDate (datetime) --

          The timestamp when the certificate that was used by edge-optimized endpoint for this domain name was uploaded.

        • DomainNameStatus (string) --

          The status of the domain name migration. The valid values are AVAILABLE, UPDATING, PENDING_CERTIFICATE_REIMPORT, and PENDING_OWNERSHIP_VERIFICATION. If the status is UPDATING, the domain cannot be modified further until the existing operation is complete. If it is AVAILABLE, the domain can be updated.

        • DomainNameStatusMessage (string) --

          An optional text message containing detailed information about status of the domain name migration.

        • EndpointType (string) --

          The endpoint type.

        • HostedZoneId (string) --

          The Amazon Route 53 Hosted Zone ID of the endpoint.

        • IpAddressType (string) --

          The IP address types that can invoke the domain name. Use ipv4 to allow only IPv4 addresses to invoke your domain name, or use dualstack to allow both IPv4 and IPv6 addresses to invoke your domain name.

        • SecurityPolicy (string) --

          The Transport Layer Security (TLS) version of the security policy for this domain name. The valid values are TLS_1_0 and TLS_1_2.

        • OwnershipVerificationCertificateArn (string) --

          The ARN of the public certificate issued by ACM to validate ownership of your custom domain. Only required when configuring mutual TLS and using an ACM imported or private CA certificate ARN as the regionalCertificateArn

    • MutualTlsAuthentication (dict) --

      The mutual TLS authentication configuration for a custom domain name.

      • TruststoreUri (string) --

        An Amazon S3 URL that specifies the truststore for mutual TLS authentication, for example, s3://bucket-name/key-name. The truststore can contain certificates from public or private certificate authorities. To update the truststore, upload a new version to S3, and then update your custom domain name to use the new version. To update the truststore, you must have permissions to access the S3 object.

      • TruststoreVersion (string) --

        The version of the S3 object that contains your truststore. To specify a version, you must have versioning enabled for the S3 bucket.

      • TruststoreWarnings (list) --

        A list of warnings that API Gateway returns while processing your truststore. Invalid certificates produce warnings. Mutual TLS is still enabled, but some clients might not be able to access your API. To resolve warnings, upload a new truststore to S3, and then update you domain name to use the new version.

        • (string) --

    • RoutingMode (string) --

      The routing mode.

    • Tags (dict) --

      The collection of tags associated with a domain name.

      • (string) --

        • (string) --

          A string with a length between [0-1600].