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

aws.ec2.AvailabilityZoneGroup

Explore with Pulumi AI

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

    Manages an EC2 Availability Zone Group, such as updating its opt-in status.

    NOTE: This is an advanced resource. The provider will automatically assume management of the EC2 Availability Zone Group without import and perform no actions on removal from configuration.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.ec2.AvailabilityZoneGroup("example", {
        groupName: "us-west-2-lax-1",
        optInStatus: "opted-in",
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.ec2.AvailabilityZoneGroup("example",
        group_name="us-west-2-lax-1",
        opt_in_status="opted-in")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ec2.NewAvailabilityZoneGroup(ctx, "example", &ec2.AvailabilityZoneGroupArgs{
    			GroupName:   pulumi.String("us-west-2-lax-1"),
    			OptInStatus: pulumi.String("opted-in"),
    		})
    		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.Ec2.AvailabilityZoneGroup("example", new()
        {
            GroupName = "us-west-2-lax-1",
            OptInStatus = "opted-in",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.ec2.AvailabilityZoneGroup;
    import com.pulumi.aws.ec2.AvailabilityZoneGroupArgs;
    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 AvailabilityZoneGroup("example", AvailabilityZoneGroupArgs.builder()
                .groupName("us-west-2-lax-1")
                .optInStatus("opted-in")
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:ec2:AvailabilityZoneGroup
        properties:
          groupName: us-west-2-lax-1
          optInStatus: opted-in
    

    Create AvailabilityZoneGroup Resource

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

    Constructor syntax

    new AvailabilityZoneGroup(name: string, args: AvailabilityZoneGroupArgs, opts?: CustomResourceOptions);
    @overload
    def AvailabilityZoneGroup(resource_name: str,
                              args: AvailabilityZoneGroupArgs,
                              opts: Optional[ResourceOptions] = None)
    
    @overload
    def AvailabilityZoneGroup(resource_name: str,
                              opts: Optional[ResourceOptions] = None,
                              group_name: Optional[str] = None,
                              opt_in_status: Optional[str] = None)
    func NewAvailabilityZoneGroup(ctx *Context, name string, args AvailabilityZoneGroupArgs, opts ...ResourceOption) (*AvailabilityZoneGroup, error)
    public AvailabilityZoneGroup(string name, AvailabilityZoneGroupArgs args, CustomResourceOptions? opts = null)
    public AvailabilityZoneGroup(String name, AvailabilityZoneGroupArgs args)
    public AvailabilityZoneGroup(String name, AvailabilityZoneGroupArgs args, CustomResourceOptions options)
    
    type: aws:ec2:AvailabilityZoneGroup
    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 AvailabilityZoneGroupArgs
    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 AvailabilityZoneGroupArgs
    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 AvailabilityZoneGroupArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AvailabilityZoneGroupArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AvailabilityZoneGroupArgs
    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 availabilityZoneGroupResource = new Aws.Ec2.AvailabilityZoneGroup("availabilityZoneGroupResource", new()
    {
        GroupName = "string",
        OptInStatus = "string",
    });
    
    example, err := ec2.NewAvailabilityZoneGroup(ctx, "availabilityZoneGroupResource", &ec2.AvailabilityZoneGroupArgs{
    	GroupName:   pulumi.String("string"),
    	OptInStatus: pulumi.String("string"),
    })
    
    var availabilityZoneGroupResource = new AvailabilityZoneGroup("availabilityZoneGroupResource", AvailabilityZoneGroupArgs.builder()
        .groupName("string")
        .optInStatus("string")
        .build());
    
    availability_zone_group_resource = aws.ec2.AvailabilityZoneGroup("availabilityZoneGroupResource",
        group_name="string",
        opt_in_status="string")
    
    const availabilityZoneGroupResource = new aws.ec2.AvailabilityZoneGroup("availabilityZoneGroupResource", {
        groupName: "string",
        optInStatus: "string",
    });
    
    type: aws:ec2:AvailabilityZoneGroup
    properties:
        groupName: string
        optInStatus: string
    

    AvailabilityZoneGroup 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 AvailabilityZoneGroup resource accepts the following input properties:

    GroupName string
    Name of the Availability Zone Group.
    OptInStatus string
    Indicates whether to enable or disable Availability Zone Group. Valid values: opted-in or not-opted-in.
    GroupName string
    Name of the Availability Zone Group.
    OptInStatus string
    Indicates whether to enable or disable Availability Zone Group. Valid values: opted-in or not-opted-in.
    groupName String
    Name of the Availability Zone Group.
    optInStatus String
    Indicates whether to enable or disable Availability Zone Group. Valid values: opted-in or not-opted-in.
    groupName string
    Name of the Availability Zone Group.
    optInStatus string
    Indicates whether to enable or disable Availability Zone Group. Valid values: opted-in or not-opted-in.
    group_name str
    Name of the Availability Zone Group.
    opt_in_status str
    Indicates whether to enable or disable Availability Zone Group. Valid values: opted-in or not-opted-in.
    groupName String
    Name of the Availability Zone Group.
    optInStatus String
    Indicates whether to enable or disable Availability Zone Group. Valid values: opted-in or not-opted-in.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the AvailabilityZoneGroup 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 AvailabilityZoneGroup Resource

    Get an existing AvailabilityZoneGroup 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?: AvailabilityZoneGroupState, opts?: CustomResourceOptions): AvailabilityZoneGroup
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            group_name: Optional[str] = None,
            opt_in_status: Optional[str] = None) -> AvailabilityZoneGroup
    func GetAvailabilityZoneGroup(ctx *Context, name string, id IDInput, state *AvailabilityZoneGroupState, opts ...ResourceOption) (*AvailabilityZoneGroup, error)
    public static AvailabilityZoneGroup Get(string name, Input<string> id, AvailabilityZoneGroupState? state, CustomResourceOptions? opts = null)
    public static AvailabilityZoneGroup get(String name, Output<String> id, AvailabilityZoneGroupState 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:
    GroupName string
    Name of the Availability Zone Group.
    OptInStatus string
    Indicates whether to enable or disable Availability Zone Group. Valid values: opted-in or not-opted-in.
    GroupName string
    Name of the Availability Zone Group.
    OptInStatus string
    Indicates whether to enable or disable Availability Zone Group. Valid values: opted-in or not-opted-in.
    groupName String
    Name of the Availability Zone Group.
    optInStatus String
    Indicates whether to enable or disable Availability Zone Group. Valid values: opted-in or not-opted-in.
    groupName string
    Name of the Availability Zone Group.
    optInStatus string
    Indicates whether to enable or disable Availability Zone Group. Valid values: opted-in or not-opted-in.
    group_name str
    Name of the Availability Zone Group.
    opt_in_status str
    Indicates whether to enable or disable Availability Zone Group. Valid values: opted-in or not-opted-in.
    groupName String
    Name of the Availability Zone Group.
    optInStatus String
    Indicates whether to enable or disable Availability Zone Group. Valid values: opted-in or not-opted-in.

    Import

    Using pulumi import, import EC2 Availability Zone Groups using the group name. For example:

    $ pulumi import aws:ec2/availabilityZoneGroup:AvailabilityZoneGroup example us-west-2-lax-1
    

    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