EC2 / Client / describe_spot_datafeed_subscription

describe_spot_datafeed_subscription#

EC2.Client.describe_spot_datafeed_subscription(**kwargs)#

Describes the data feed for Spot Instances. For more information, see Spot Instance data feed in the Amazon EC2 User Guide.

See also: AWS API Documentation

Request Syntax

response = client.describe_spot_datafeed_subscription(
    DryRun=True|False
)
Parameters:

DryRun (boolean) – Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

Return type:

dict

Returns:

Response Syntax

{
    'SpotDatafeedSubscription': {
        'Bucket': 'string',
        'Fault': {
            'Code': 'string',
            'Message': 'string'
        },
        'OwnerId': 'string',
        'Prefix': 'string',
        'State': 'Active'|'Inactive'
    }
}

Response Structure

  • (dict) –

    Contains the output of DescribeSpotDatafeedSubscription.

    • SpotDatafeedSubscription (dict) –

      The Spot Instance data feed subscription.

      • Bucket (string) –

        The name of the Amazon S3 bucket where the Spot Instance data feed is located.

      • Fault (dict) –

        The fault codes for the Spot Instance request, if any.

        • Code (string) –

          The reason code for the Spot Instance state change.

        • Message (string) –

          The message for the Spot Instance state change.

      • OwnerId (string) –

        The Amazon Web Services account ID of the account.

      • Prefix (string) –

        The prefix for the data feed files.

      • State (string) –

        The state of the Spot Instance data feed subscription.

Examples

This example describes the Spot Instance datafeed subscription for your AWS account.

response = client.describe_spot_datafeed_subscription(
)

print(response)

Expected Output:

{
    'SpotDatafeedSubscription': {
        'Bucket': 'my-s3-bucket',
        'OwnerId': '123456789012',
        'Prefix': 'spotdata',
        'State': 'Active',
    },
    'ResponseMetadata': {
        '...': '...',
    },
}