db_cluster_parameter_group#

This module defines the present, absent and describe functionality for AWS document db cluster parameter group

async idem_aws.states.aws.docdb.db_cluster_parameter_group.present(hub, ctx, name: str, db_parameter_group_family: str, description: str, resource_id: str = None, parameters: ~typing.List[~types.DB Parameter group configuration.Parameter] = None, tags: ~typing.Dict[str, ~typing.Any] = None) Dict[str, Any][source]#

Creates a new cluster parameter group.

Parameters in a cluster parameter group apply to all of the instances in a cluster.

A cluster parameter group is initially created with the default parameters for the database engine used by instances in the cluster. In Amazon DocumentDB, you cannot make modifications directly to the default.docdb3.6 cluster parameter group. If your Amazon DocumentDB cluster is using the default cluster parameter group and you want to modify a value in it, you must first create a new parameter group or copy an existing parameter group , modify it, and then apply the modified parameter group to your cluster. For the new cluster parameter group and associated settings to take effect, you must then reboot the instances in the cluster without failover. For more information, see Modifying Amazon DocumentDB Cluster Parameter Groups.

Parameters:
  • name (str) – DBClusterParameterGroupName parameter on the resource. This value is stored as a lowercase string. This is also used as idem name.

  • db_parameter_group_family (str) – The cluster parameter group family name.

  • description (str) – The description for the DB cluster parameter group.

  • resource_id (str, Optional) – DBClusterParameterGroupName of the resource. Defaults to None.

  • parameters (list, Optional) –

    parameters in the DB cluster parameter group. Defaults to None. These parameters can only be modified. To modify more than one parameter, submit a list of the following: ParameterName, ParameterValue, and ApplyMethod. A maximum of 20 parameters can be modified in a single request.

    Note

    Changes to dynamic parameters are applied immediately. Changes to static parameters require a reboot without failover to the DB cluster associated with the parameter group before the change can take effect.

    Warning

    After you create a cluster parameter group, you should wait at least 5 minutes before creating your first cluster that uses that cluster parameter group as the default parameter group. This allows Amazon DocumentDB to fully complete the create action before the parameter group is used as the default for a new cluster. This step is especially important for parameters that are critical when creating the default database for a cluster, such as the character set for the default database defined by the character_set_database parameter.

    Below are the attributes available for parameters:

    Type: object dict(Describes a parameter)

    • ParameterName (str):

      Specifies the name of the parameter.

    • ParameterValue (str):

      Specifies the value of the parameter.

    • Description (str, Optional):

      provides a description of the parameter.

    • Source (str, Optional):

      Indicates the source of the parameter value.

    • ApplyType (str, Optional):

      Specifies the engine specific parameters type.

    • DataType (str, Optional):

      Specifies the valid data type for the parameter.

    • AllowedValues (str, Optional):

      Specifies the valid range of values for the parameter.

    • MinimumEngineVersion (str, Optional):

      The earliest engine version to which the parameter can apply.

    • ApplyMethod (str, Optional):

      Indicates when to apply parameter updates.

    • SupportedEngineModes (list, Optional):

      The valid DB engine modes.

  • tags (dict, Optional) – The tags to be assigned to the new DB cluster parameter group. Defaults to None.

Request Syntax:
[idem_test_aws_docdb_db_cluster_parameter_group]:
  aws.docdb.db_cluster_parameter_group.present:
  - db_cluster_parameter_group_arn: 'string'
  - db_parameter_group_family: 'string'
  - description: 'string'
  - name: 'string'
  - parameters:
    - AllowedValues: 'string'
      ApplyMethod: 'string'
      ApplyType: 'string'
      DataType: 'string'
      Description: 'string'
      IsModifiable: 'string'
      ParameterName: 'string'
      Source: 'string'

Examples

default.aurora5.6:
  aws.docdb.db_cluster_parameter_group.present:
  - db_cluster_parameter_group_arn: arn:aws:rds:ca-central-1:746014882121:cluster-pg:default.aurora5.6
  -  db_parameter_group_family: aurora5.6
  -  description: Default cluster parameter group for aurora5.6
  -  name: default.aurora5.6
  -  parameters:
    - AllowedValues: 0,1
      ApplyMethod: pending-reboot
      ApplyType: static
      DataType: boolean
      Description: Controls whether user-defined functions that have only an xxx symbol
        for the main function can be loaded
      IsModifiable: false
      ParameterName: allow-suspicious-udfs
      Source: engine-default
async idem_aws.states.aws.docdb.db_cluster_parameter_group.absent(hub, ctx, name: str, resource_id: str = None) Dict[str, Any][source]#

Deletes a specified cluster parameter group. The cluster parameter group to be deleted can’t be associated with any clusters.

Parameters:
  • name (str) – DBClusterParameterGroupName parameter on the resource. This is also used as idem name.

  • resource_id (str, Optional) –

    DBClusterParameterGroupName of the resource. Defaults to None. Idem automatically considers the resource being absent if resource_id is not specified.

    Constraints: Must match the name of an existing DBClusterParameterGroupName.

Examples

resource_is_absent:
  aws.docdb.db_cluster_parameter_group.absent:
    - name: 'test-db-clus-param-group'
    - resource_id: 'test-db-clus-param-group'
async idem_aws.states.aws.docdb.db_cluster_parameter_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 DBClusterParameterGroup.

Examples

$ idem describe aws.docdb.db_cluster_parameter_group