1. Packages
  2. AWS
  3. API Docs
  4. appstream
  5. FleetStackAssociation
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

aws.appstream.FleetStackAssociation

Explore with Pulumi AI

aws logo
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

    Manages an AppStream Fleet Stack association.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.appstream.Fleet("example", {
        name: "NAME",
        imageName: "Amazon-AppStream2-Sample-Image-03-11-2023",
        instanceType: "stream.standard.small",
        computeCapacity: {
            desiredInstances: 1,
        },
    });
    const exampleStack = new aws.appstream.Stack("example", {name: "STACK NAME"});
    const exampleFleetStackAssociation = new aws.appstream.FleetStackAssociation("example", {
        fleetName: example.name,
        stackName: exampleStack.name,
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.appstream.Fleet("example",
        name="NAME",
        image_name="Amazon-AppStream2-Sample-Image-03-11-2023",
        instance_type="stream.standard.small",
        compute_capacity={
            "desired_instances": 1,
        })
    example_stack = aws.appstream.Stack("example", name="STACK NAME")
    example_fleet_stack_association = aws.appstream.FleetStackAssociation("example",
        fleet_name=example.name,
        stack_name=example_stack.name)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/appstream"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := appstream.NewFleet(ctx, "example", &appstream.FleetArgs{
    			Name:         pulumi.String("NAME"),
    			ImageName:    pulumi.String("Amazon-AppStream2-Sample-Image-03-11-2023"),
    			InstanceType: pulumi.String("stream.standard.small"),
    			ComputeCapacity: &appstream.FleetComputeCapacityArgs{
    				DesiredInstances: pulumi.Int(1),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		exampleStack, err := appstream.NewStack(ctx, "example", &appstream.StackArgs{
    			Name: pulumi.String("STACK NAME"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = appstream.NewFleetStackAssociation(ctx, "example", &appstream.FleetStackAssociationArgs{
    			FleetName: example.Name,
    			StackName: exampleStack.Name,
    		})
    		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 example = new Aws.AppStream.Fleet("example", new()
        {
            Name = "NAME",
            ImageName = "Amazon-AppStream2-Sample-Image-03-11-2023",
            InstanceType = "stream.standard.small",
            ComputeCapacity = new Aws.AppStream.Inputs.FleetComputeCapacityArgs
            {
                DesiredInstances = 1,
            },
        });
    
        var exampleStack = new Aws.AppStream.Stack("example", new()
        {
            Name = "STACK NAME",
        });
    
        var exampleFleetStackAssociation = new Aws.AppStream.FleetStackAssociation("example", new()
        {
            FleetName = example.Name,
            StackName = exampleStack.Name,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.appstream.Fleet;
    import com.pulumi.aws.appstream.FleetArgs;
    import com.pulumi.aws.appstream.inputs.FleetComputeCapacityArgs;
    import com.pulumi.aws.appstream.Stack;
    import com.pulumi.aws.appstream.StackArgs;
    import com.pulumi.aws.appstream.FleetStackAssociation;
    import com.pulumi.aws.appstream.FleetStackAssociationArgs;
    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) {
            var example = new Fleet("example", FleetArgs.builder()
                .name("NAME")
                .imageName("Amazon-AppStream2-Sample-Image-03-11-2023")
                .instanceType("stream.standard.small")
                .computeCapacity(FleetComputeCapacityArgs.builder()
                    .desiredInstances(1)
                    .build())
                .build());
    
            var exampleStack = new Stack("exampleStack", StackArgs.builder()
                .name("STACK NAME")
                .build());
    
            var exampleFleetStackAssociation = new FleetStackAssociation("exampleFleetStackAssociation", FleetStackAssociationArgs.builder()
                .fleetName(example.name())
                .stackName(exampleStack.name())
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:appstream:Fleet
        properties:
          name: NAME
          imageName: Amazon-AppStream2-Sample-Image-03-11-2023
          instanceType: stream.standard.small
          computeCapacity:
            desiredInstances: 1
      exampleStack:
        type: aws:appstream:Stack
        name: example
        properties:
          name: STACK NAME
      exampleFleetStackAssociation:
        type: aws:appstream:FleetStackAssociation
        name: example
        properties:
          fleetName: ${example.name}
          stackName: ${exampleStack.name}
    

    Create FleetStackAssociation Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new FleetStackAssociation(name: string, args: FleetStackAssociationArgs, opts?: CustomResourceOptions);
    @overload
    def FleetStackAssociation(resource_name: str,
                              args: FleetStackAssociationArgs,
                              opts: Optional[ResourceOptions] = None)
    
    @overload
    def FleetStackAssociation(resource_name: str,
                              opts: Optional[ResourceOptions] = None,
                              fleet_name: Optional[str] = None,
                              stack_name: Optional[str] = None)
    func NewFleetStackAssociation(ctx *Context, name string, args FleetStackAssociationArgs, opts ...ResourceOption) (*FleetStackAssociation, error)
    public FleetStackAssociation(string name, FleetStackAssociationArgs args, CustomResourceOptions? opts = null)
    public FleetStackAssociation(String name, FleetStackAssociationArgs args)
    public FleetStackAssociation(String name, FleetStackAssociationArgs args, CustomResourceOptions options)
    
    type: aws:appstream:FleetStackAssociation
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args FleetStackAssociationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args FleetStackAssociationArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args FleetStackAssociationArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args FleetStackAssociationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args FleetStackAssociationArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var fleetStackAssociationResource = new Aws.AppStream.FleetStackAssociation("fleetStackAssociationResource", new()
    {
        FleetName = "string",
        StackName = "string",
    });
    
    example, err := appstream.NewFleetStackAssociation(ctx, "fleetStackAssociationResource", &appstream.FleetStackAssociationArgs{
    	FleetName: pulumi.String("string"),
    	StackName: pulumi.String("string"),
    })
    
    var fleetStackAssociationResource = new FleetStackAssociation("fleetStackAssociationResource", FleetStackAssociationArgs.builder()
        .fleetName("string")
        .stackName("string")
        .build());
    
    fleet_stack_association_resource = aws.appstream.FleetStackAssociation("fleetStackAssociationResource",
        fleet_name="string",
        stack_name="string")
    
    const fleetStackAssociationResource = new aws.appstream.FleetStackAssociation("fleetStackAssociationResource", {
        fleetName: "string",
        stackName: "string",
    });
    
    type: aws:appstream:FleetStackAssociation
    properties:
        fleetName: string
        stackName: string
    

    FleetStackAssociation Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The FleetStackAssociation resource accepts the following input properties:

    FleetName string
    Name of the fleet.
    StackName string
    Name of the stack.
    FleetName string
    Name of the fleet.
    StackName string
    Name of the stack.
    fleetName String
    Name of the fleet.
    stackName String
    Name of the stack.
    fleetName string
    Name of the fleet.
    stackName string
    Name of the stack.
    fleet_name str
    Name of the fleet.
    stack_name str
    Name of the stack.
    fleetName String
    Name of the fleet.
    stackName String
    Name of the stack.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the FleetStackAssociation resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing FleetStackAssociation Resource

    Get an existing FleetStackAssociation resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: FleetStackAssociationState, opts?: CustomResourceOptions): FleetStackAssociation
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            fleet_name: Optional[str] = None,
            stack_name: Optional[str] = None) -> FleetStackAssociation
    func GetFleetStackAssociation(ctx *Context, name string, id IDInput, state *FleetStackAssociationState, opts ...ResourceOption) (*FleetStackAssociation, error)
    public static FleetStackAssociation Get(string name, Input<string> id, FleetStackAssociationState? state, CustomResourceOptions? opts = null)
    public static FleetStackAssociation get(String name, Output<String> id, FleetStackAssociationState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    FleetName string
    Name of the fleet.
    StackName string
    Name of the stack.
    FleetName string
    Name of the fleet.
    StackName string
    Name of the stack.
    fleetName String
    Name of the fleet.
    stackName String
    Name of the stack.
    fleetName string
    Name of the fleet.
    stackName string
    Name of the stack.
    fleet_name str
    Name of the fleet.
    stack_name str
    Name of the stack.
    fleetName String
    Name of the fleet.
    stackName String
    Name of the stack.

    Import

    Using pulumi import, import AppStream Stack Fleet Association using the fleet_name and stack_name separated by a slash (/). For example:

    $ pulumi import aws:appstream/fleetStackAssociation:FleetStackAssociation example fleetName/stackName
    

    To learn more about importing existing cloud resources, see Importing resources.

    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 v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi