generated from pulumi/pulumi-tf-provider-boilerplate
/
getSupportedHostShapes.go
178 lines (156 loc) · 7.68 KB
/
getSupportedHostShapes.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package ocvp
import (
"context"
"reflect"
"github.com/pulumi/pulumi-oci/sdk/go/oci/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// This data source provides the list of Supported Host Shapes in Oracle Cloud Infrastructure Oracle Cloud VMware Solution service.
//
// Lists supported compute shapes for ESXi hosts.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-oci/sdk/go/oci/Ocvp"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := Ocvp.GetSupportedHostShapes(ctx, &ocvp.GetSupportedHostShapesArgs{
// CompartmentId: compartmentId,
// InitialHostShapeName: pulumi.StringRef(testShape.Name),
// IsSingleHostSddcSupported: pulumi.BoolRef(supportedHostShapeIsSingleHostSddcSupported),
// Name: pulumi.StringRef(supportedHostShapeName),
// }, nil)
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
func GetSupportedHostShapes(ctx *pulumi.Context, args *GetSupportedHostShapesArgs, opts ...pulumi.InvokeOption) (*GetSupportedHostShapesResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv GetSupportedHostShapesResult
err := ctx.Invoke("oci:Ocvp/getSupportedHostShapes:getSupportedHostShapes", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getSupportedHostShapes.
type GetSupportedHostShapesArgs struct {
// The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment.
CompartmentId string `pulumi:"compartmentId"`
Filters []GetSupportedHostShapesFilter `pulumi:"filters"`
// A filter to return only the shapes compatible with the initial host shape of the Cluster.
InitialHostShapeName *string `pulumi:"initialHostShapeName"`
// A filter to return only resources that support single host SDDC.
IsSingleHostSddcSupported *bool `pulumi:"isSingleHostSddcSupported"`
// A filter to return only resources that match the given name exactly.
Name *string `pulumi:"name"`
// (Optional) A filter to return only resources that match the given SDDC type exactly.
//
// Deprecated: The 'sddc_type' field has been deprecated. Please use 'is_single_host_sddc_supported' instead.
SddcType *string `pulumi:"sddcType"`
}
// A collection of values returned by getSupportedHostShapes.
type GetSupportedHostShapesResult struct {
CompartmentId string `pulumi:"compartmentId"`
Filters []GetSupportedHostShapesFilter `pulumi:"filters"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
InitialHostShapeName *string `pulumi:"initialHostShapeName"`
// Indicates whether the shape supports single host SDDCs.
IsSingleHostSddcSupported *bool `pulumi:"isSingleHostSddcSupported"`
// A list of the supported compute shapes for ESXi hosts.
Items []GetSupportedHostShapesItem `pulumi:"items"`
// The name of the supported compute shape.
Name *string `pulumi:"name"`
// Deprecated: The 'sddc_type' field has been deprecated. Please use 'is_single_host_sddc_supported' instead.
SddcType *string `pulumi:"sddcType"`
}
func GetSupportedHostShapesOutput(ctx *pulumi.Context, args GetSupportedHostShapesOutputArgs, opts ...pulumi.InvokeOption) GetSupportedHostShapesResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (GetSupportedHostShapesResult, error) {
args := v.(GetSupportedHostShapesArgs)
r, err := GetSupportedHostShapes(ctx, &args, opts...)
var s GetSupportedHostShapesResult
if r != nil {
s = *r
}
return s, err
}).(GetSupportedHostShapesResultOutput)
}
// A collection of arguments for invoking getSupportedHostShapes.
type GetSupportedHostShapesOutputArgs struct {
// The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment.
CompartmentId pulumi.StringInput `pulumi:"compartmentId"`
Filters GetSupportedHostShapesFilterArrayInput `pulumi:"filters"`
// A filter to return only the shapes compatible with the initial host shape of the Cluster.
InitialHostShapeName pulumi.StringPtrInput `pulumi:"initialHostShapeName"`
// A filter to return only resources that support single host SDDC.
IsSingleHostSddcSupported pulumi.BoolPtrInput `pulumi:"isSingleHostSddcSupported"`
// A filter to return only resources that match the given name exactly.
Name pulumi.StringPtrInput `pulumi:"name"`
// (Optional) A filter to return only resources that match the given SDDC type exactly.
//
// Deprecated: The 'sddc_type' field has been deprecated. Please use 'is_single_host_sddc_supported' instead.
SddcType pulumi.StringPtrInput `pulumi:"sddcType"`
}
func (GetSupportedHostShapesOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*GetSupportedHostShapesArgs)(nil)).Elem()
}
// A collection of values returned by getSupportedHostShapes.
type GetSupportedHostShapesResultOutput struct{ *pulumi.OutputState }
func (GetSupportedHostShapesResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GetSupportedHostShapesResult)(nil)).Elem()
}
func (o GetSupportedHostShapesResultOutput) ToGetSupportedHostShapesResultOutput() GetSupportedHostShapesResultOutput {
return o
}
func (o GetSupportedHostShapesResultOutput) ToGetSupportedHostShapesResultOutputWithContext(ctx context.Context) GetSupportedHostShapesResultOutput {
return o
}
func (o GetSupportedHostShapesResultOutput) CompartmentId() pulumi.StringOutput {
return o.ApplyT(func(v GetSupportedHostShapesResult) string { return v.CompartmentId }).(pulumi.StringOutput)
}
func (o GetSupportedHostShapesResultOutput) Filters() GetSupportedHostShapesFilterArrayOutput {
return o.ApplyT(func(v GetSupportedHostShapesResult) []GetSupportedHostShapesFilter { return v.Filters }).(GetSupportedHostShapesFilterArrayOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o GetSupportedHostShapesResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v GetSupportedHostShapesResult) string { return v.Id }).(pulumi.StringOutput)
}
func (o GetSupportedHostShapesResultOutput) InitialHostShapeName() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetSupportedHostShapesResult) *string { return v.InitialHostShapeName }).(pulumi.StringPtrOutput)
}
// Indicates whether the shape supports single host SDDCs.
func (o GetSupportedHostShapesResultOutput) IsSingleHostSddcSupported() pulumi.BoolPtrOutput {
return o.ApplyT(func(v GetSupportedHostShapesResult) *bool { return v.IsSingleHostSddcSupported }).(pulumi.BoolPtrOutput)
}
// A list of the supported compute shapes for ESXi hosts.
func (o GetSupportedHostShapesResultOutput) Items() GetSupportedHostShapesItemArrayOutput {
return o.ApplyT(func(v GetSupportedHostShapesResult) []GetSupportedHostShapesItem { return v.Items }).(GetSupportedHostShapesItemArrayOutput)
}
// The name of the supported compute shape.
func (o GetSupportedHostShapesResultOutput) Name() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetSupportedHostShapesResult) *string { return v.Name }).(pulumi.StringPtrOutput)
}
// Deprecated: The 'sddc_type' field has been deprecated. Please use 'is_single_host_sddc_supported' instead.
func (o GetSupportedHostShapesResultOutput) SddcType() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetSupportedHostShapesResult) *string { return v.SddcType }).(pulumi.StringPtrOutput)
}
func init() {
pulumi.RegisterOutputType(GetSupportedHostShapesResultOutput{})
}