db_instance#

Exec module for managing Amazon Neptune DB Instance.

async idem_aws.exec.aws.neptune.db_instance.get(hub, ctx, name: str, resource_id: str = None, filters: List = None) Dict[source]#

Fetch and use an un-managed neptune db instance as a data-source.

Parameters:
  • name (str) – The name of the Idem state.

  • resource_id (str, Optional) – AWS Neptune DBInstanceIdentifier to identify the resource.

  • filters (list, Optional) –

    A filter that specifies one or more DB instances to describe. Supported filters are,

    • db-cluster(str, Optional):

      Accepts DB cluster identifiers and DB cluster Amazon Resource Names (ARNs). The results list will only include information about the DB instances associated with the DB clusters identified by these ARNs.

    • engine(str, Optional):

      Accepts an engine name (such as neptune ), and restricts the results list to DB instances created by that engine.

Note

If filters used matches more than one neptune db instance, idem will default to fetching the first result.

Returns:

result(bool):

Whether the result of the function has been successful (True) or not (False).

comment(list):

A list of messages.

ret(dict or None):

The AWS Neptune DB Instance in “present” format.

Return type:

Dict[bool, list, dict or None]

Examples

Calling this exec module function from the cli:

idem exec aws.neptune.db_instance.get name="idem_name" resource_id="resource_id"

Calling this exec module function from within a state module in pure python:

async def state_function(hub, ctx, name, resource_id, **kwargs):
    ret = await hub.exec.aws.neptune.db_instance.get(
        ctx, name=name, resource_id=resource_id
    )
async idem_aws.exec.aws.neptune.db_instance.list_(hub, ctx, name: str = None, filters: List = None) Dict[source]#

Use a list of un-managed neptune db instances as a data-source. Supply one of the inputs as the filter.

Parameters:
  • name (str, Optional) – The name of idem state.

  • filters (list, Optional) –

    A filter that specifies one or more DB instances to describe. Supported filters are,

    • db-cluster(str, Optional):

      Accepts DB cluster identifiers and DB cluster Amazon Resource Names (ARNs). The results list will only include information about the DB instances associated with the DB clusters identified by these ARNs.

    • engine(str, Optional):

      Accepts an engine name (such as neptune ), and restricts the results list to DB instances created by that engine.

Returns:

result(bool):

Whether the result of the function has been successful (True) or not (False).

comment(list):

A list of messages.

ret(dict or None):

The AWS Neptune DB Instance in “present” format.

Return type:

Dict[bool, list, dict or None]

Examples

Calling this exec module function from the cli:

idem exec aws.neptune.db_instance.list name="idem_name" filters=[db-cluster-id="", engine=""]

Calling this exec module function from within a state module in pure python:

async def state_function(hub, ctx, name, resource_id, **kwargs):
    ret = await hub.exec.aws.neptune.db_instance.get(
        ctx, name=name, filters=[db-cluster-id="", engine=""]
    )