pricing

package
v6.66.1 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: Apache-2.0 Imports: 4 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 {
	// 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"`
	// 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 {
	// Product attribute name that you want to filter on.
	Field string `pulumi:"field"`
	// Product attribute value that you want to filter on.
	Value string `pulumi:"value"`
}

type GetProductFilterArgs

type GetProductFilterArgs struct {
	// Product attribute name that you want to filter on.
	Field pulumi.StringInput `pulumi:"field"`
	// 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

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

Product attribute value that you want to filter on.

type GetProductOutputArgs

type GetProductOutputArgs struct {
	// 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"`
	// 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

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/v6/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{
			ServiceCode: "AmazonEC2",
			Filters: []pricing.GetProductFilter{
				{
					Field: "instanceType",
					Value: "c5.xlarge",
				},
				{
					Field: "operatingSystem",
					Value: "Linux",
				},
				{
					Field: "location",
					Value: "US East (N. Virginia)",
				},
				{
					Field: "preInstalledSw",
					Value: "NA",
				},
				{
					Field: "licenseModel",
					Value: "No License required",
				},
				{
					Field: "tenancy",
					Value: "Shared",
				},
				{
					Field: "capacitystatus",
					Value: "Used",
				},
			},
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}

```

```go package main

import (

"github.com/pulumi/pulumi-aws/sdk/v6/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{
			ServiceCode: "AmazonRedshift",
			Filters: []pricing.GetProductFilter{
				{
					Field: "instanceType",
					Value: "ds1.xlarge",
				},
				{
					Field: "location",
					Value: "US East (N. Virginia)",
				},
			},
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}

```

type GetProductResultOutput

type GetProductResultOutput struct{ *pulumi.OutputState }

A collection of values returned by getProduct.

func (GetProductResultOutput) ElementType

func (GetProductResultOutput) ElementType() reflect.Type

func (GetProductResultOutput) Filters

func (GetProductResultOutput) Id

The provider-assigned unique ID for this managed resource.

func (GetProductResultOutput) Result

Set to the product returned from the API.

func (GetProductResultOutput) ServiceCode

func (o GetProductResultOutput) ServiceCode() pulumi.StringOutput

func (GetProductResultOutput) ToGetProductResultOutput

func (o GetProductResultOutput) ToGetProductResultOutput() GetProductResultOutput

func (GetProductResultOutput) ToGetProductResultOutputWithContext

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