AWS Classic

v5.21.1 published on Thursday, Nov 17, 2022 by Pulumi

AvailabilityZoneGroup

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

using System.Collections.Generic;
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 main

import (
	"github.com/pulumi/pulumi-aws/sdk/v5/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
	})
}
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());

    }
}
import pulumi
import pulumi_aws as aws

example = aws.ec2.AvailabilityZoneGroup("example",
    group_name="us-west-2-lax-1",
    opt_in_status="opted-in")
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",
});
resources:
  example:
    type: aws:ec2:AvailabilityZoneGroup
    properties:
      groupName: us-west-2-lax-1
      optInStatus: opted-in

Create AvailabilityZoneGroup Resource

new AvailabilityZoneGroup(name: string, args: AvailabilityZoneGroupArgs, opts?: CustomResourceOptions);
@overload
def AvailabilityZoneGroup(resource_name: str,
                          opts: Optional[ResourceOptions] = None,
                          group_name: Optional[str] = None,
                          opt_in_status: Optional[str] = None)
@overload
def AvailabilityZoneGroup(resource_name: str,
                          args: AvailabilityZoneGroupArgs,
                          opts: Optional[ResourceOptions] = 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.

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.

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

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

EC2 Availability Zone Groups can be imported using the group name, e.g.,

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

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes

This Pulumi package is based on the aws Terraform Provider.