spot_instance_request#

Exec module for managing EC2 spot instance requests.

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

Get a spot instance request resource from AWS. Supply one of the inputs as the filter.

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

  • resource_id (str, Optional) – ID of the spot instance request.

Returns:

Returns spot instance request in present format

Return type:

Dict[str, Any]

Examples

Calling this exec module function from the cli with filters

idem exec aws.ec2.spot_instance_request.get name="my_resource"

Using in a state:

my_unmanaged_resource:
  exec.run:
    - path: aws.ec2.spot_instance_request.get
    - kwargs:
        name: my_resource
async idem_aws.exec.aws.ec2.spot_instance_request.list_(hub, ctx, name: str = None, filters: List = None) Dict[source]#

Get a list of spot instance request resources from AWS. Supply one of the inputs as the filter.

Parameters:
Returns:

Returns spot instance request list in present format

Return type:

Dict[str, Any]

Examples

Calling this exec module function from the cli with filters

idem exec aws.ec2.spot_instance_request.list name="my_resource" filters=[{'name': 'name', 'values': ['resource-name']}]

Using in a state:

my_unmanaged_resource:
  exec.run:
    - path: aws.ec2.spot_instance_request.list
    - kwargs:
        name: my_resource
        filters:
            - name: 'name'
              values: ['resource-name']