Documentation
¶
Index ¶
- type GetProductArgs
- type GetProductFilter
- type GetProductFilterArgs
- type GetProductFilterArray
- type GetProductFilterArrayInput
- type GetProductFilterArrayOutput
- func (GetProductFilterArrayOutput) ElementType() reflect.Type
- func (o GetProductFilterArrayOutput) Index(i pulumi.IntInput) GetProductFilterOutput
- func (o GetProductFilterArrayOutput) ToGetProductFilterArrayOutput() GetProductFilterArrayOutput
- func (o GetProductFilterArrayOutput) ToGetProductFilterArrayOutputWithContext(ctx context.Context) GetProductFilterArrayOutput
- type GetProductFilterInput
- type GetProductFilterOutput
- func (GetProductFilterOutput) ElementType() reflect.Type
- func (o GetProductFilterOutput) Field() pulumi.StringOutput
- func (o GetProductFilterOutput) ToGetProductFilterOutput() GetProductFilterOutput
- func (o GetProductFilterOutput) ToGetProductFilterOutputWithContext(ctx context.Context) GetProductFilterOutput
- func (o GetProductFilterOutput) Value() pulumi.StringOutput
- type GetProductOutputArgs
- type GetProductResult
- type GetProductResultOutput
- func (GetProductResultOutput) ElementType() reflect.Type
- func (o GetProductResultOutput) Filters() GetProductFilterArrayOutput
- func (o GetProductResultOutput) Id() pulumi.StringOutput
- func (o GetProductResultOutput) Result() pulumi.StringOutput
- func (o GetProductResultOutput) ServiceCode() pulumi.StringOutput
- func (o GetProductResultOutput) ToGetProductResultOutput() GetProductResultOutput
- func (o GetProductResultOutput) ToGetProductResultOutputWithContext(ctx context.Context) GetProductResultOutput
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 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) ElementType() reflect.Type
func (GetProductFilterArrayOutput) Index ¶
func (o GetProductFilterArrayOutput) Index(i pulumi.IntInput) GetProductFilterOutput
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 ¶
func (o GetProductFilterOutput) Field() pulumi.StringOutput
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 ¶
func (o GetProductFilterOutput) Value() pulumi.StringOutput
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/v7/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/v7/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 GetProductOutput ¶
func GetProductOutput(ctx *pulumi.Context, args GetProductOutputArgs, opts ...pulumi.InvokeOption) GetProductResultOutput
func (GetProductResultOutput) ElementType ¶
func (GetProductResultOutput) ElementType() reflect.Type
func (GetProductResultOutput) Filters ¶
func (o GetProductResultOutput) Filters() GetProductFilterArrayOutput
func (GetProductResultOutput) Id ¶
func (o GetProductResultOutput) Id() pulumi.StringOutput
The provider-assigned unique ID for this managed resource.
func (GetProductResultOutput) Result ¶
func (o GetProductResultOutput) Result() pulumi.StringOutput
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