cache_subnet_group#

State module for managing Amazon Elasticache Subnet Groups.

async idem_aws.states.aws.elasticache.cache_subnet_group.present(hub, ctx, name: str, subnet_ids: List[str], cache_subnet_group_description: str, resource_id: str = None, tags: Dict[str, Any] = None) Dict[str, Any][source]#

Creates an AWS Elasticache Subnet Group.

Parameters:
  • name (str) – An Idem name of the resource

  • resource_id (str, Optional) – The name of the AWS Elasticache Subnet Group in Amazon Web Services.

  • cache_subnet_group_description (str) – A description for the cache subnet group.

  • subnet_ids (list) – A list of VPC subnet IDs for the cache subnet group.

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

    • Key (str):

      The key of the tag.

    • Value (str):

      The value of the tag.

Request Syntax:
[idem_test_aws_elasticache_cache_subnet_group]:
  aws.elasticache.cache_subnet_group.present:
    - name: 'string'
    - resource_id: 'string'
    - cache_subnet_group_description: 'string'
    - subnet_id:
        - 'string'
    - tags:
        - Key: 'string'
          Value: 'string'
Returns:

Dict[str, Any]

Examples

idem_test_aws_elasticache_cache_subnet_group:
  aws.elasticache.cache_subnet_group.present:
    - name: 'idem_test_cache_subnet_group'
    - cache_subnet_group_description: 'My Elasticache Subnet Group'
    - subnet_id:
      - 'subnet-12345678'
    - tags:
        - Key: 'provider'
          Value: 'idem'
async idem_aws.states.aws.elasticache.cache_subnet_group.absent(hub, ctx, name: str, resource_id: str = None) Dict[str, Any][source]#

Deletes the specified AWS Elasticache Subnet Group.

Warning

You cannot delete a default cache subnet group or one that is associated with any clusters.

Parameters:
  • name (str) – An Idem name of the resource.

  • resource_id (str, Optional) –

    The name of the AWS Elasticache Subnet Group in Amazon Web Services.

    Warning

    Idem automatically considers this resource being absent if this field is not specified.

Request Syntax:
[idem_test_aws_elasticache_cache_subnet_group]:
  aws.elasticache.cache_subnet_group.absent:
    - name: 'string'
    - resource_id: 'string'
Returns:

Dict[str, Any]

Examples

idem_test_aws_elasticache_cache_subnet_group:
  aws.elasticache.cache_subnet_group.absent:
    - name: 'idem_test_cache_subnet_group'
    - resource_id: 'my-subnet-group'
async idem_aws.states.aws.elasticache.cache_subnet_group.describe(hub, ctx) Dict[str, Dict[str, Any]][source]#

Describes Elasticache Subnet Groups in a way that can be recreated/managed with the corresponding “present” function.

Returns:

Dict[str, Dict[str, Any]]

Examples

$ idem describe aws.elasticache.cache_subnet_group