Skip to content

EC2  >  Operations  >  create_spot_datafeed_subscription

create_spot_datafeed_subscription

Operation

create_spot_datafeed_subscription async

create_spot_datafeed_subscription(input: CreateSpotDatafeedSubscriptionInput, plugins: list[Plugin] | None = None) -> CreateSpotDatafeedSubscriptionOutput

Creates a data feed for Spot Instances, enabling you to view Spot Instance usage logs. You can create one data feed per Amazon Web Services account. For more information, see Spot Instance data feed in the Amazon EC2 User Guide.

Parameters:

Name Type Description Default
input CreateSpotDatafeedSubscriptionInput

An instance of CreateSpotDatafeedSubscriptionInput.

required
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None

Returns:

Type Description
CreateSpotDatafeedSubscriptionOutput

An instance of CreateSpotDatafeedSubscriptionOutput.

Input

CreateSpotDatafeedSubscriptionInput dataclass

Bases: _SerdeShape

Contains the parameters for CreateSpotDatafeedSubscription.

Attributes

bucket class-attribute instance-attribute
bucket: str | None = ...

The name of the Amazon S3 bucket in which to store the Spot Instance data feed. For more information about bucket names, see Bucket naming rules in the Amazon S3 User Guide.

dry_run class-attribute instance-attribute
dry_run: bool | None = ...

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.

prefix class-attribute instance-attribute
prefix: str | None = ...

The prefix for the data feed file names.

Output

CreateSpotDatafeedSubscriptionOutput dataclass

Bases: _SerdeShape

Contains the output of CreateSpotDatafeedSubscription.

Attributes

response_metadata class-attribute instance-attribute
response_metadata: ResponseMetadata = ...

Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.

spot_datafeed_subscription class-attribute instance-attribute
spot_datafeed_subscription: SpotDatafeedSubscription | None = ...

The Spot Instance data feed subscription.