1. Packages
  2. AWS
  3. API Docs
  4. ec2
  5. getSpotDatafeedSubscription
AWS v7.3.1 published on Wednesday, Aug 6, 2025 by Pulumi

aws.ec2.getSpotDatafeedSubscription

Explore with Pulumi AI

aws logo
AWS v7.3.1 published on Wednesday, Aug 6, 2025 by Pulumi

    There is only a single spot data feed subscription per account.

    Data source for accessing an AWS EC2 (Elastic Compute Cloud) spot data feed subscription.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const _default = aws.ec2.getSpotDatafeedSubscription({});
    
    import pulumi
    import pulumi_aws as aws
    
    default = aws.ec2.get_spot_datafeed_subscription()
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/ec2"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ec2.LookupSpotDatafeedSubscription(ctx, &ec2.LookupSpotDatafeedSubscriptionArgs{}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var @default = Aws.Ec2.GetSpotDatafeedSubscription.Invoke();
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.ec2.Ec2Functions;
    import com.pulumi.aws.ec2.inputs.GetSpotDatafeedSubscriptionArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var default = Ec2Functions.getSpotDatafeedSubscription(GetSpotDatafeedSubscriptionArgs.builder()
                .build());
    
        }
    }
    
    variables:
      default:
        fn::invoke:
          function: aws:ec2:getSpotDatafeedSubscription
          arguments: {}
    

    Using getSpotDatafeedSubscription

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getSpotDatafeedSubscription(args: GetSpotDatafeedSubscriptionArgs, opts?: InvokeOptions): Promise<GetSpotDatafeedSubscriptionResult>
    function getSpotDatafeedSubscriptionOutput(args: GetSpotDatafeedSubscriptionOutputArgs, opts?: InvokeOptions): Output<GetSpotDatafeedSubscriptionResult>
    def get_spot_datafeed_subscription(region: Optional[str] = None,
                                       opts: Optional[InvokeOptions] = None) -> GetSpotDatafeedSubscriptionResult
    def get_spot_datafeed_subscription_output(region: Optional[pulumi.Input[str]] = None,
                                       opts: Optional[InvokeOptions] = None) -> Output[GetSpotDatafeedSubscriptionResult]
    func LookupSpotDatafeedSubscription(ctx *Context, args *LookupSpotDatafeedSubscriptionArgs, opts ...InvokeOption) (*LookupSpotDatafeedSubscriptionResult, error)
    func LookupSpotDatafeedSubscriptionOutput(ctx *Context, args *LookupSpotDatafeedSubscriptionOutputArgs, opts ...InvokeOption) LookupSpotDatafeedSubscriptionResultOutput

    > Note: This function is named LookupSpotDatafeedSubscription in the Go SDK.

    public static class GetSpotDatafeedSubscription 
    {
        public static Task<GetSpotDatafeedSubscriptionResult> InvokeAsync(GetSpotDatafeedSubscriptionArgs args, InvokeOptions? opts = null)
        public static Output<GetSpotDatafeedSubscriptionResult> Invoke(GetSpotDatafeedSubscriptionInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetSpotDatafeedSubscriptionResult> getSpotDatafeedSubscription(GetSpotDatafeedSubscriptionArgs args, InvokeOptions options)
    public static Output<GetSpotDatafeedSubscriptionResult> getSpotDatafeedSubscription(GetSpotDatafeedSubscriptionArgs args, InvokeOptions options)
    
    fn::invoke:
      function: aws:ec2/getSpotDatafeedSubscription:getSpotDatafeedSubscription
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    region str
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.

    getSpotDatafeedSubscription Result

    The following output properties are available:

    Bucket string
    The name of the Amazon S3 bucket where the spot instance data feed is located.
    Id string
    The provider-assigned unique ID for this managed resource.
    Prefix string
    The prefix for the data feed files.
    Region string
    Bucket string
    The name of the Amazon S3 bucket where the spot instance data feed is located.
    Id string
    The provider-assigned unique ID for this managed resource.
    Prefix string
    The prefix for the data feed files.
    Region string
    bucket String
    The name of the Amazon S3 bucket where the spot instance data feed is located.
    id String
    The provider-assigned unique ID for this managed resource.
    prefix String
    The prefix for the data feed files.
    region String
    bucket string
    The name of the Amazon S3 bucket where the spot instance data feed is located.
    id string
    The provider-assigned unique ID for this managed resource.
    prefix string
    The prefix for the data feed files.
    region string
    bucket str
    The name of the Amazon S3 bucket where the spot instance data feed is located.
    id str
    The provider-assigned unique ID for this managed resource.
    prefix str
    The prefix for the data feed files.
    region str
    bucket String
    The name of the Amazon S3 bucket where the spot instance data feed is located.
    id String
    The provider-assigned unique ID for this managed resource.
    prefix String
    The prefix for the data feed files.
    region String

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo
    AWS v7.3.1 published on Wednesday, Aug 6, 2025 by Pulumi