db_subnet_group#

State operations for RDS db_subnet_group

async idem_aws.states.aws.rds.db_subnet_group.present(hub, ctx, name: str, db_subnet_group_description: str, subnets: List[str], resource_id: str = None, tags: Dict[str, Any] = None) Dict[str, Any][source]#

Creates a new DB subnet group. DB subnet groups must contain at least one subnet in at least two AZs in the Amazon Web Services Region.

Parameters:
  • name (str) – The Idem name of the DB subnet group.

  • db_subnet_group_description (str) – DB Subnet Group description

  • subnets (List[str]) – The EC2 Subnet IDs for the DB subnet group

  • resource_id (str, Optional) – AWS RDS DBSubnetGroupName to identify the resource

  • tags (Dict or List, Optional) –

    Dict in the format of {tag-key: tag-value} or List of tags in the format of [{“Key”: tag-key, “Value”: tag-value}] to associate with the DB instance.

    Each tag consists of a key name and an associated value. Defaults to None.

    • Key (str, Optional): The key of the tag. Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws:.

    • Value(str, Optional): The value of the tag. Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

Request Syntax:
[db-subnet-group-name]:
aws.rds.db_subnet_group.absent:
  • db_subnet_group_description: ‘string’

  • subnets: ‘list’

  • tags: - Key: ‘string’

    Value: ‘string’

Returns:

Dict[str, Any]

Examples

new-db-subnet-group:
    aws.rds.db_subnet_group.absent:
      - db_subnet_group_description: "should not be blank"
      - subnets:
        - subnet-03e29c119d78899e1
        - subnet-04dd5bc5aa08cbd89
        - subnet-0754289517e31d331
      - tags:
        - Key: name
          Value: new-db-subnet-group
async idem_aws.states.aws.rds.db_subnet_group.absent(hub, ctx, name: str, resource_id: str = None) Dict[str, Any][source]#

Deletes a DB subnet group. The specified database subnet group must not be associated with any DB instances.

Parameters:
  • name (str) – The Idem name of the DB subnet group.

  • resource_id (str, Optional) – The AWS RDS DBSubnetGroupName to identify the resource

Returns:

Dict[str, Any]

Examples

resource_is_absent:
  aws.rds.db_subnet_group.absent:
    - name: value
async idem_aws.states.aws.rds.db_subnet_group.describe(hub, ctx) Dict[str, Dict[str, Any]][source]#

Describe the resource in a way that can be recreated/managed with the corresponding “present” function

Returns a list of DBSubnetGroup descriptions. For an overview of CIDR ranges, go to the Wikipedia Tutorial.

Returns:

Dict[str, Any]

Examples

$ idem describe aws.rds.db_subnet_group