availability

package
v0.1.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 26, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PkgVersion added in v0.0.5

func PkgVersion() (semver.Version, error)

PkgVersion uses reflection to determine the version of the current package. If a version cannot be determined, v1 will be assumed. The second return value is always nil.

Types

type GetRegionsArgs

type GetRegionsArgs struct {
	// A bool variable indicates that the query will include `UNAVAILABLE` regions.
	IncludeUnavailable *bool `pulumi:"includeUnavailable"`
	// When specified, only the region with the exactly name match will be returned. `default` value means it consistent with the provider region.
	Name *string `pulumi:"name"`
	// Used to save results.
	ResultOutputFile *string `pulumi:"resultOutputFile"`
}

A collection of arguments for invoking getRegions.

type GetRegionsOutputArgs

type GetRegionsOutputArgs struct {
	// A bool variable indicates that the query will include `UNAVAILABLE` regions.
	IncludeUnavailable pulumi.BoolPtrInput `pulumi:"includeUnavailable"`
	// When specified, only the region with the exactly name match will be returned. `default` value means it consistent with the provider region.
	Name pulumi.StringPtrInput `pulumi:"name"`
	// Used to save results.
	ResultOutputFile pulumi.StringPtrInput `pulumi:"resultOutputFile"`
}

A collection of arguments for invoking getRegions.

func (GetRegionsOutputArgs) ElementType

func (GetRegionsOutputArgs) ElementType() reflect.Type

type GetRegionsRegion

type GetRegionsRegion struct {
	// The description of the region, like `Guangzhou Region`.
	Description string `pulumi:"description"`
	// When specified, only the region with the exactly name match will be returned. `default` value means it consistent with the provider region.
	Name string `pulumi:"name"`
	// The state of the region, indicate availability using `AVAILABLE` and `UNAVAILABLE` values.
	State string `pulumi:"state"`
}

type GetRegionsRegionArgs

type GetRegionsRegionArgs struct {
	// The description of the region, like `Guangzhou Region`.
	Description pulumi.StringInput `pulumi:"description"`
	// When specified, only the region with the exactly name match will be returned. `default` value means it consistent with the provider region.
	Name pulumi.StringInput `pulumi:"name"`
	// The state of the region, indicate availability using `AVAILABLE` and `UNAVAILABLE` values.
	State pulumi.StringInput `pulumi:"state"`
}

func (GetRegionsRegionArgs) ElementType

func (GetRegionsRegionArgs) ElementType() reflect.Type

func (GetRegionsRegionArgs) ToGetRegionsRegionOutput

func (i GetRegionsRegionArgs) ToGetRegionsRegionOutput() GetRegionsRegionOutput

func (GetRegionsRegionArgs) ToGetRegionsRegionOutputWithContext

func (i GetRegionsRegionArgs) ToGetRegionsRegionOutputWithContext(ctx context.Context) GetRegionsRegionOutput

type GetRegionsRegionArray

type GetRegionsRegionArray []GetRegionsRegionInput

func (GetRegionsRegionArray) ElementType

func (GetRegionsRegionArray) ElementType() reflect.Type

func (GetRegionsRegionArray) ToGetRegionsRegionArrayOutput

func (i GetRegionsRegionArray) ToGetRegionsRegionArrayOutput() GetRegionsRegionArrayOutput

func (GetRegionsRegionArray) ToGetRegionsRegionArrayOutputWithContext

func (i GetRegionsRegionArray) ToGetRegionsRegionArrayOutputWithContext(ctx context.Context) GetRegionsRegionArrayOutput

type GetRegionsRegionArrayInput

type GetRegionsRegionArrayInput interface {
	pulumi.Input

	ToGetRegionsRegionArrayOutput() GetRegionsRegionArrayOutput
	ToGetRegionsRegionArrayOutputWithContext(context.Context) GetRegionsRegionArrayOutput
}

GetRegionsRegionArrayInput is an input type that accepts GetRegionsRegionArray and GetRegionsRegionArrayOutput values. You can construct a concrete instance of `GetRegionsRegionArrayInput` via:

GetRegionsRegionArray{ GetRegionsRegionArgs{...} }

type GetRegionsRegionArrayOutput

type GetRegionsRegionArrayOutput struct{ *pulumi.OutputState }

func (GetRegionsRegionArrayOutput) ElementType

func (GetRegionsRegionArrayOutput) Index

func (GetRegionsRegionArrayOutput) ToGetRegionsRegionArrayOutput

func (o GetRegionsRegionArrayOutput) ToGetRegionsRegionArrayOutput() GetRegionsRegionArrayOutput

func (GetRegionsRegionArrayOutput) ToGetRegionsRegionArrayOutputWithContext

func (o GetRegionsRegionArrayOutput) ToGetRegionsRegionArrayOutputWithContext(ctx context.Context) GetRegionsRegionArrayOutput

type GetRegionsRegionInput

type GetRegionsRegionInput interface {
	pulumi.Input

	ToGetRegionsRegionOutput() GetRegionsRegionOutput
	ToGetRegionsRegionOutputWithContext(context.Context) GetRegionsRegionOutput
}

GetRegionsRegionInput is an input type that accepts GetRegionsRegionArgs and GetRegionsRegionOutput values. You can construct a concrete instance of `GetRegionsRegionInput` via:

GetRegionsRegionArgs{...}

type GetRegionsRegionOutput

type GetRegionsRegionOutput struct{ *pulumi.OutputState }

func (GetRegionsRegionOutput) Description

func (o GetRegionsRegionOutput) Description() pulumi.StringOutput

The description of the region, like `Guangzhou Region`.

func (GetRegionsRegionOutput) ElementType

func (GetRegionsRegionOutput) ElementType() reflect.Type

func (GetRegionsRegionOutput) Name

When specified, only the region with the exactly name match will be returned. `default` value means it consistent with the provider region.

func (GetRegionsRegionOutput) State

The state of the region, indicate availability using `AVAILABLE` and `UNAVAILABLE` values.

func (GetRegionsRegionOutput) ToGetRegionsRegionOutput

func (o GetRegionsRegionOutput) ToGetRegionsRegionOutput() GetRegionsRegionOutput

func (GetRegionsRegionOutput) ToGetRegionsRegionOutputWithContext

func (o GetRegionsRegionOutput) ToGetRegionsRegionOutputWithContext(ctx context.Context) GetRegionsRegionOutput

type GetRegionsResult

type GetRegionsResult struct {
	// The provider-assigned unique ID for this managed resource.
	Id                 string `pulumi:"id"`
	IncludeUnavailable *bool  `pulumi:"includeUnavailable"`
	// The name of the region, like `ap-guangzhou`.
	Name *string `pulumi:"name"`
	// A list of regions will be exported and its every element contains the following attributes:
	Regions          []GetRegionsRegion `pulumi:"regions"`
	ResultOutputFile *string            `pulumi:"resultOutputFile"`
}

A collection of values returned by getRegions.

func GetRegions

func GetRegions(ctx *pulumi.Context, args *GetRegionsArgs, opts ...pulumi.InvokeOption) (*GetRegionsResult, error)

Use this data source to get the available regions. By default only `AVAILABLE` regions will be returned, but `UNAVAILABLE` regions can also be fetched when `includeUnavailable` is specified.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-tencentcloud/sdk/go/tencentcloud/Availability"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/tencentcloudstack/pulumi-tencentcloud/sdk/go/tencentcloud/Availability"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := Availability.GetRegions(ctx, &availability.GetRegionsArgs{
			Name: pulumi.StringRef("ap-guangzhou"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}

```

type GetRegionsResultOutput

type GetRegionsResultOutput struct{ *pulumi.OutputState }

A collection of values returned by getRegions.

func (GetRegionsResultOutput) ElementType

func (GetRegionsResultOutput) ElementType() reflect.Type

func (GetRegionsResultOutput) Id

The provider-assigned unique ID for this managed resource.

func (GetRegionsResultOutput) IncludeUnavailable

func (o GetRegionsResultOutput) IncludeUnavailable() pulumi.BoolPtrOutput

func (GetRegionsResultOutput) Name

The name of the region, like `ap-guangzhou`.

func (GetRegionsResultOutput) Regions

A list of regions will be exported and its every element contains the following attributes:

func (GetRegionsResultOutput) ResultOutputFile

func (o GetRegionsResultOutput) ResultOutputFile() pulumi.StringPtrOutput

func (GetRegionsResultOutput) ToGetRegionsResultOutput

func (o GetRegionsResultOutput) ToGetRegionsResultOutput() GetRegionsResultOutput

func (GetRegionsResultOutput) ToGetRegionsResultOutputWithContext

func (o GetRegionsResultOutput) ToGetRegionsResultOutputWithContext(ctx context.Context) GetRegionsResultOutput

type GetZonesByProductArgs

type GetZonesByProductArgs struct {
	// A bool variable indicates that the query will include `UNAVAILABLE` zones.
	IncludeUnavailable *bool `pulumi:"includeUnavailable"`
	// When specified, only the zone with the exactly name match will be returned.
	Name *string `pulumi:"name"`
	// A string variable indicates that the query will use product information.
	Product string `pulumi:"product"`
	// Used to save results.
	ResultOutputFile *string `pulumi:"resultOutputFile"`
}

A collection of arguments for invoking getZonesByProduct.

type GetZonesByProductOutputArgs

type GetZonesByProductOutputArgs struct {
	// A bool variable indicates that the query will include `UNAVAILABLE` zones.
	IncludeUnavailable pulumi.BoolPtrInput `pulumi:"includeUnavailable"`
	// When specified, only the zone with the exactly name match will be returned.
	Name pulumi.StringPtrInput `pulumi:"name"`
	// A string variable indicates that the query will use product information.
	Product pulumi.StringInput `pulumi:"product"`
	// Used to save results.
	ResultOutputFile pulumi.StringPtrInput `pulumi:"resultOutputFile"`
}

A collection of arguments for invoking getZonesByProduct.

func (GetZonesByProductOutputArgs) ElementType

type GetZonesByProductResult

type GetZonesByProductResult struct {
	// The provider-assigned unique ID for this managed resource.
	Id                 string `pulumi:"id"`
	IncludeUnavailable *bool  `pulumi:"includeUnavailable"`
	// The name of the zone, like `ap-guangzhou-3`.
	Name             *string `pulumi:"name"`
	Product          string  `pulumi:"product"`
	ResultOutputFile *string `pulumi:"resultOutputFile"`
	// A list of zones will be exported and its every element contains the following attributes:
	Zones []GetZonesByProductZone `pulumi:"zones"`
}

A collection of values returned by getZonesByProduct.

func GetZonesByProduct

func GetZonesByProduct(ctx *pulumi.Context, args *GetZonesByProductArgs, opts ...pulumi.InvokeOption) (*GetZonesByProductResult, error)

Use this data source to get the available zones in current region. Must set product param to fetch the product infomations(e.g. => cvm, vpc). By default only `AVAILABLE` zones will be returned, but `UNAVAILABLE` zones can also be fetched when `includeUnavailable` is specified.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-tencentcloud/sdk/go/tencentcloud/Availability"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/tencentcloudstack/pulumi-tencentcloud/sdk/go/tencentcloud/Availability"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := Availability.GetZonesByProduct(ctx, &availability.GetZonesByProductArgs{
			Product: "cvm",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}

```

type GetZonesByProductResultOutput

type GetZonesByProductResultOutput struct{ *pulumi.OutputState }

A collection of values returned by getZonesByProduct.

func (GetZonesByProductResultOutput) ElementType

func (GetZonesByProductResultOutput) Id

The provider-assigned unique ID for this managed resource.

func (GetZonesByProductResultOutput) IncludeUnavailable

func (o GetZonesByProductResultOutput) IncludeUnavailable() pulumi.BoolPtrOutput

func (GetZonesByProductResultOutput) Name

The name of the zone, like `ap-guangzhou-3`.

func (GetZonesByProductResultOutput) Product

func (GetZonesByProductResultOutput) ResultOutputFile

func (GetZonesByProductResultOutput) ToGetZonesByProductResultOutput

func (o GetZonesByProductResultOutput) ToGetZonesByProductResultOutput() GetZonesByProductResultOutput

func (GetZonesByProductResultOutput) ToGetZonesByProductResultOutputWithContext

func (o GetZonesByProductResultOutput) ToGetZonesByProductResultOutputWithContext(ctx context.Context) GetZonesByProductResultOutput

func (GetZonesByProductResultOutput) Zones

A list of zones will be exported and its every element contains the following attributes:

type GetZonesByProductZone

type GetZonesByProductZone struct {
	// The description of the zone, like `Guangzhou Zone 3`.
	Description string `pulumi:"description"`
	// An internal id for the zone, like `200003`, usually not so useful.
	Id string `pulumi:"id"`
	// When specified, only the zone with the exactly name match will be returned.
	Name string `pulumi:"name"`
	// The state of the zone, indicate availability using `AVAILABLE` and `UNAVAILABLE` values.
	State string `pulumi:"state"`
}

type GetZonesByProductZoneArgs

type GetZonesByProductZoneArgs struct {
	// The description of the zone, like `Guangzhou Zone 3`.
	Description pulumi.StringInput `pulumi:"description"`
	// An internal id for the zone, like `200003`, usually not so useful.
	Id pulumi.StringInput `pulumi:"id"`
	// When specified, only the zone with the exactly name match will be returned.
	Name pulumi.StringInput `pulumi:"name"`
	// The state of the zone, indicate availability using `AVAILABLE` and `UNAVAILABLE` values.
	State pulumi.StringInput `pulumi:"state"`
}

func (GetZonesByProductZoneArgs) ElementType

func (GetZonesByProductZoneArgs) ElementType() reflect.Type

func (GetZonesByProductZoneArgs) ToGetZonesByProductZoneOutput

func (i GetZonesByProductZoneArgs) ToGetZonesByProductZoneOutput() GetZonesByProductZoneOutput

func (GetZonesByProductZoneArgs) ToGetZonesByProductZoneOutputWithContext

func (i GetZonesByProductZoneArgs) ToGetZonesByProductZoneOutputWithContext(ctx context.Context) GetZonesByProductZoneOutput

type GetZonesByProductZoneArray

type GetZonesByProductZoneArray []GetZonesByProductZoneInput

func (GetZonesByProductZoneArray) ElementType

func (GetZonesByProductZoneArray) ElementType() reflect.Type

func (GetZonesByProductZoneArray) ToGetZonesByProductZoneArrayOutput

func (i GetZonesByProductZoneArray) ToGetZonesByProductZoneArrayOutput() GetZonesByProductZoneArrayOutput

func (GetZonesByProductZoneArray) ToGetZonesByProductZoneArrayOutputWithContext

func (i GetZonesByProductZoneArray) ToGetZonesByProductZoneArrayOutputWithContext(ctx context.Context) GetZonesByProductZoneArrayOutput

type GetZonesByProductZoneArrayInput

type GetZonesByProductZoneArrayInput interface {
	pulumi.Input

	ToGetZonesByProductZoneArrayOutput() GetZonesByProductZoneArrayOutput
	ToGetZonesByProductZoneArrayOutputWithContext(context.Context) GetZonesByProductZoneArrayOutput
}

GetZonesByProductZoneArrayInput is an input type that accepts GetZonesByProductZoneArray and GetZonesByProductZoneArrayOutput values. You can construct a concrete instance of `GetZonesByProductZoneArrayInput` via:

GetZonesByProductZoneArray{ GetZonesByProductZoneArgs{...} }

type GetZonesByProductZoneArrayOutput

type GetZonesByProductZoneArrayOutput struct{ *pulumi.OutputState }

func (GetZonesByProductZoneArrayOutput) ElementType

func (GetZonesByProductZoneArrayOutput) Index

func (GetZonesByProductZoneArrayOutput) ToGetZonesByProductZoneArrayOutput

func (o GetZonesByProductZoneArrayOutput) ToGetZonesByProductZoneArrayOutput() GetZonesByProductZoneArrayOutput

func (GetZonesByProductZoneArrayOutput) ToGetZonesByProductZoneArrayOutputWithContext

func (o GetZonesByProductZoneArrayOutput) ToGetZonesByProductZoneArrayOutputWithContext(ctx context.Context) GetZonesByProductZoneArrayOutput

type GetZonesByProductZoneInput

type GetZonesByProductZoneInput interface {
	pulumi.Input

	ToGetZonesByProductZoneOutput() GetZonesByProductZoneOutput
	ToGetZonesByProductZoneOutputWithContext(context.Context) GetZonesByProductZoneOutput
}

GetZonesByProductZoneInput is an input type that accepts GetZonesByProductZoneArgs and GetZonesByProductZoneOutput values. You can construct a concrete instance of `GetZonesByProductZoneInput` via:

GetZonesByProductZoneArgs{...}

type GetZonesByProductZoneOutput

type GetZonesByProductZoneOutput struct{ *pulumi.OutputState }

func (GetZonesByProductZoneOutput) Description

The description of the zone, like `Guangzhou Zone 3`.

func (GetZonesByProductZoneOutput) ElementType

func (GetZonesByProductZoneOutput) Id

An internal id for the zone, like `200003`, usually not so useful.

func (GetZonesByProductZoneOutput) Name

When specified, only the zone with the exactly name match will be returned.

func (GetZonesByProductZoneOutput) State

The state of the zone, indicate availability using `AVAILABLE` and `UNAVAILABLE` values.

func (GetZonesByProductZoneOutput) ToGetZonesByProductZoneOutput

func (o GetZonesByProductZoneOutput) ToGetZonesByProductZoneOutput() GetZonesByProductZoneOutput

func (GetZonesByProductZoneOutput) ToGetZonesByProductZoneOutputWithContext

func (o GetZonesByProductZoneOutput) ToGetZonesByProductZoneOutputWithContext(ctx context.Context) GetZonesByProductZoneOutput

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL