pricing

package
v4.37.3 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GetProductArgs

type GetProductArgs struct {
	// A list of filters. Passed directly to the API (see GetProducts API reference). These filters must describe a single product, this resource will fail if more than one product is returned by the API.
	Filters []GetProductFilter `pulumi:"filters"`
	// The code of the service. Available service codes can be fetched using the DescribeServices pricing API call.
	ServiceCode string `pulumi:"serviceCode"`
}

A collection of arguments for invoking getProduct.

type GetProductFilter

type GetProductFilter struct {
	// The product attribute name that you want to filter on.
	Field string `pulumi:"field"`
	// The product attribute value that you want to filter on.
	Value string `pulumi:"value"`
}

type GetProductFilterArgs

type GetProductFilterArgs struct {
	// The product attribute name that you want to filter on.
	Field pulumi.StringInput `pulumi:"field"`
	// The product attribute value that you want to filter on.
	Value pulumi.StringInput `pulumi:"value"`
}

func (GetProductFilterArgs) ElementType

func (GetProductFilterArgs) ElementType() reflect.Type

func (GetProductFilterArgs) ToGetProductFilterOutput

func (i GetProductFilterArgs) ToGetProductFilterOutput() GetProductFilterOutput

func (GetProductFilterArgs) ToGetProductFilterOutputWithContext

func (i GetProductFilterArgs) ToGetProductFilterOutputWithContext(ctx context.Context) GetProductFilterOutput

type GetProductFilterArray

type GetProductFilterArray []GetProductFilterInput

func (GetProductFilterArray) ElementType

func (GetProductFilterArray) ElementType() reflect.Type

func (GetProductFilterArray) ToGetProductFilterArrayOutput

func (i GetProductFilterArray) ToGetProductFilterArrayOutput() GetProductFilterArrayOutput

func (GetProductFilterArray) ToGetProductFilterArrayOutputWithContext

func (i GetProductFilterArray) ToGetProductFilterArrayOutputWithContext(ctx context.Context) GetProductFilterArrayOutput

type GetProductFilterArrayInput

type GetProductFilterArrayInput interface {
	pulumi.Input

	ToGetProductFilterArrayOutput() GetProductFilterArrayOutput
	ToGetProductFilterArrayOutputWithContext(context.Context) GetProductFilterArrayOutput
}

GetProductFilterArrayInput is an input type that accepts GetProductFilterArray and GetProductFilterArrayOutput values. You can construct a concrete instance of `GetProductFilterArrayInput` via:

GetProductFilterArray{ GetProductFilterArgs{...} }

type GetProductFilterArrayOutput

type GetProductFilterArrayOutput struct{ *pulumi.OutputState }

func (GetProductFilterArrayOutput) ElementType

func (GetProductFilterArrayOutput) Index

func (GetProductFilterArrayOutput) ToGetProductFilterArrayOutput

func (o GetProductFilterArrayOutput) ToGetProductFilterArrayOutput() GetProductFilterArrayOutput

func (GetProductFilterArrayOutput) ToGetProductFilterArrayOutputWithContext

func (o GetProductFilterArrayOutput) ToGetProductFilterArrayOutputWithContext(ctx context.Context) GetProductFilterArrayOutput

type GetProductFilterInput

type GetProductFilterInput interface {
	pulumi.Input

	ToGetProductFilterOutput() GetProductFilterOutput
	ToGetProductFilterOutputWithContext(context.Context) GetProductFilterOutput
}

GetProductFilterInput is an input type that accepts GetProductFilterArgs and GetProductFilterOutput values. You can construct a concrete instance of `GetProductFilterInput` via:

GetProductFilterArgs{...}

type GetProductFilterOutput

type GetProductFilterOutput struct{ *pulumi.OutputState }

func (GetProductFilterOutput) ElementType

func (GetProductFilterOutput) ElementType() reflect.Type

func (GetProductFilterOutput) Field

The product attribute name that you want to filter on.

func (GetProductFilterOutput) ToGetProductFilterOutput

func (o GetProductFilterOutput) ToGetProductFilterOutput() GetProductFilterOutput

func (GetProductFilterOutput) ToGetProductFilterOutputWithContext

func (o GetProductFilterOutput) ToGetProductFilterOutputWithContext(ctx context.Context) GetProductFilterOutput

func (GetProductFilterOutput) Value

The product attribute value that you want to filter on.

type GetProductOutputArgs added in v4.21.0

type GetProductOutputArgs struct {
	// A list of filters. Passed directly to the API (see GetProducts API reference). These filters must describe a single product, this resource will fail if more than one product is returned by the API.
	Filters GetProductFilterArrayInput `pulumi:"filters"`
	// The code of the service. Available service codes can be fetched using the DescribeServices pricing API call.
	ServiceCode pulumi.StringInput `pulumi:"serviceCode"`
}

A collection of arguments for invoking getProduct.

func (GetProductOutputArgs) ElementType added in v4.21.0

func (GetProductOutputArgs) ElementType() reflect.Type

type GetProductResult

type GetProductResult struct {
	Filters []GetProductFilter `pulumi:"filters"`
	// The provider-assigned unique ID for this managed resource.
	Id string `pulumi:"id"`
	// Set to the product returned from the API.
	Result      string `pulumi:"result"`
	ServiceCode string `pulumi:"serviceCode"`
}

A collection of values returned by getProduct.

func GetProduct

func GetProduct(ctx *pulumi.Context, args *GetProductArgs, opts ...pulumi.InvokeOption) (*GetProductResult, error)

Use this data source to get the pricing information of all products in AWS. This data source is only available in a us-east-1 or ap-south-1 provider.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-aws/sdk/v4/go/aws/pricing"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := pricing.GetProduct(ctx, &pricing.GetProductArgs{
			Filters: []pricing.GetProductFilter{
				pricing.GetProductFilter{
					Field: "instanceType",
					Value: "c5.xlarge",
				},
				pricing.GetProductFilter{
					Field: "operatingSystem",
					Value: "Linux",
				},
				pricing.GetProductFilter{
					Field: "location",
					Value: "US East (N. Virginia)",
				},
				pricing.GetProductFilter{
					Field: "preInstalledSw",
					Value: "NA",
				},
				pricing.GetProductFilter{
					Field: "licenseModel",
					Value: "No License required",
				},
				pricing.GetProductFilter{
					Field: "tenancy",
					Value: "Shared",
				},
				pricing.GetProductFilter{
					Field: "capacitystatus",
					Value: "Used",
				},
			},
			ServiceCode: "AmazonEC2",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}

```

```go package main

import (

"github.com/pulumi/pulumi-aws/sdk/v4/go/aws/pricing"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := pricing.GetProduct(ctx, &pricing.GetProductArgs{
			Filters: []pricing.GetProductFilter{
				pricing.GetProductFilter{
					Field: "instanceType",
					Value: "ds1.xlarge",
				},
				pricing.GetProductFilter{
					Field: "location",
					Value: "US East (N. Virginia)",
				},
			},
			ServiceCode: "AmazonRedshift",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}

```

type GetProductResultOutput added in v4.21.0

type GetProductResultOutput struct{ *pulumi.OutputState }

A collection of values returned by getProduct.

func GetProductOutput added in v4.21.0

func GetProductOutput(ctx *pulumi.Context, args GetProductOutputArgs, opts ...pulumi.InvokeOption) GetProductResultOutput

func (GetProductResultOutput) ElementType added in v4.21.0

func (GetProductResultOutput) ElementType() reflect.Type

func (GetProductResultOutput) Filters added in v4.21.0

func (GetProductResultOutput) Id added in v4.21.0

The provider-assigned unique ID for this managed resource.

func (GetProductResultOutput) Result added in v4.21.0

Set to the product returned from the API.

func (GetProductResultOutput) ServiceCode added in v4.21.0

func (o GetProductResultOutput) ServiceCode() pulumi.StringOutput

func (GetProductResultOutput) ToGetProductResultOutput added in v4.21.0

func (o GetProductResultOutput) ToGetProductResultOutput() GetProductResultOutput

func (GetProductResultOutput) ToGetProductResultOutputWithContext added in v4.21.0

func (o GetProductResultOutput) ToGetProductResultOutputWithContext(ctx context.Context) GetProductResultOutput

Jump to

Keyboard shortcuts

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