base_path_mapping#

Exec module for AWS API Gateway Base Path Mapping resources.

async idem_aws.exec.aws.apigateway.base_path_mapping.get(hub, ctx, domain_name: str = None, base_path: str = None, resource_id: str = None)[source]#

Get a single API Gateway base path mapping from AWS. The function returns None if no resource is found. The get api call requires either of resource_id or the combination of base_path and domain name. So the user is free to choose between either the resource_id or base_path and domain name. But, both these sets are not required. When using domain_name and base_path as input parameters, both are mandatory. While, using resource_id, the other two parameters can be skipped, and hence they come as optional parameters in the signature.

Parameters:
  • domain_name (str, Optional) – The parent domain name of the base_path_mapping resource to be described.

  • base_path (str, Optional) – The base path name that callers of the API must provide as part of the URL after the domain name. This value must be unique for all of the mappings across a single API. Specify ‘(none)’ if you do not want callers to specify any base path name after the domain name.

  • resource_id (str, Optional) – Idem Resource ID that is generated once the resource is created.

Examples

Calling from the CLI:

$ idem exec aws.apigateway.base_path_mapping.get domain_name="unmanaged_apigateway_base_path_mapping_domain_name" base_path = "unmanaged_apigateway_base_path_mapping"
my_unmanaged_resource:
  exec.run:
    - path: aws.apigateway.base_path_mapping.get
    - kwargs:
        domain_name: domain_name_of_base_path
        base_path: value
$ idem exec aws.apigateway.base_path_mapping.get resource_id = "base_path_mapping_unique_id"
my_unmanaged_resource:
  exec.run:
    - path: aws.apigateway.base_path_mapping.get
    - kwargs:
        resource_id: unique_id_created
async idem_aws.exec.aws.apigateway.base_path_mapping.list_(hub, ctx, domain_name: str)[source]#

Get the list of base path mappings for the given domain name for AWS APIGateway.

Parameters:

domain_name (str) – The parent domain name of the base_path_mapping resource to be described.

Returns:

Dict[str, Any]

Examples

Calling from the CLI:

idem exec aws.apigateway.base_path_mapping.list domain_name="unmanaged_apigateway_base_path_mapping_domain_name"

Calling this exec module function from within a state:

my_unmanaged_resource:
  exec.run:
    - path: aws.apigateway.base_path_mapping.list
    - kwargs:
        domain_name: domain_name_of_base_paths