db_subnet_group#
State module for managing Amazon DB Subnet Group.
- async idem_aws.states.aws.docdb.db_subnet_group.present(hub, ctx, name: str, db_subnet_group_description: str, subnet_ids: List, resource_id: str = None, tags: Dict[str, Any] = None) Dict[str, Any] [source]#
Creates a new subnet group.
Subnet groups must contain at least one subnet in at least two Availability Zones in the Amazon Web Services Region.
- Parameters:
name (str) – An Idem name of the resource.
db_subnet_group_description (str) – The description for the subnet group.
subnet_ids (list) – The Amazon EC2 subnet IDs for the subnet group.
resource_id (str, Optional) – AWS DocumentDB Subnet Group Name. Defaults to None.
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}]
. The tags to be assigned to the subnet group. Defaults to None.
- Returns:
Dict[str, Any]
Examples
resource_is_present: aws.docdb.db_subnet_group.present: - name: value - resource_id: value - db_subnet_group_description: value - subnet_ids: value
- async idem_aws.states.aws.docdb.db_subnet_group.absent(hub, ctx, name: str, resource_id: str = None) Dict[str, Any] [source]#
Deletes a subnet group.
The specified database subnet group must not be associated with any DB instances.
- Parameters:
- Returns:
Dict[str, Any]
Examples
resource_is_absent: aws.docdb.db_subnet_group.absent: - name: value - resource_id: value
- async idem_aws.states.aws.docdb.db_subnet_group.describe(hub, ctx) Dict[str, Dict[str, Any]] [source]#
Returns a list of DBSubnetGroup descriptions.
Describe the resource in a way that can be recreated/managed with the corresponding “present” function. If a DBSubnetGroupName is specified, the list will contain only the descriptions of the specified DBSubnetGroup.
- Returns:
Dict[str, Any]
Examples
$ idem describe aws.docdb.db_subnet_group