/
loadBalancerCommonBandwidthPackageAttachment.go
275 lines (225 loc) · 18.3 KB
/
loadBalancerCommonBandwidthPackageAttachment.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
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
// 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 alb
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Provides a Alb Load Balancer Common Bandwidth Package Attachment resource.
//
// For information about Alb Load Balancer Common Bandwidth Package Attachment and how to use it, see [What is Load Balancer Common Bandwidth Package Attachment](https://www.alibabacloud.com/help/en/slb/application-load-balancer/developer-reference/api-alb-2020-06-16-attachcommonbandwidthpackagetoloadbalancer).
//
// > **NOTE:** Available since v1.200.0.
//
// ## Import
//
// Alb Load Balancer Common Bandwidth Package Attachment can be imported using the id, e.g.
//
// ```sh
// $ pulumi import alicloud:alb/loadBalancerCommonBandwidthPackageAttachment:LoadBalancerCommonBandwidthPackageAttachment example <load_balancer_id>:<bandwidth_package_id>
// ```
type LoadBalancerCommonBandwidthPackageAttachment struct {
pulumi.CustomResourceState
// The ID of the bound shared bandwidth package.
BandwidthPackageId pulumi.StringOutput `pulumi:"bandwidthPackageId"`
// Whether to PreCheck this request only. Value:-**true**: sends a check request and does not bind the shared bandwidth package to the load balancing instance. Check items include whether required parameters, request format, and business restrictions have been filled in. If the check fails, the corresponding error is returned. If the check passes, the error code 'DryRunOperation' is returned '.-**false** (default): Sends a normal request, returns the HTTP 2xx status code after the check, and directly performs the operation.
DryRun pulumi.BoolPtrOutput `pulumi:"dryRun"`
// The ID of the applied server load balancer instance.
LoadBalancerId pulumi.StringOutput `pulumi:"loadBalancerId"`
// The status of the Application Load balancing instance. Value:-**Inactive**: Stopped, indicating that the instance listener will no longer forward traffic.-**Active**: running.-**Provisioning**: The project is being created.-**Configuring**: The configuration is being changed.-**CreateFailed**: The instance cannot be deleted without any charge.
Status pulumi.StringOutput `pulumi:"status"`
}
// NewLoadBalancerCommonBandwidthPackageAttachment registers a new resource with the given unique name, arguments, and options.
func NewLoadBalancerCommonBandwidthPackageAttachment(ctx *pulumi.Context,
name string, args *LoadBalancerCommonBandwidthPackageAttachmentArgs, opts ...pulumi.ResourceOption) (*LoadBalancerCommonBandwidthPackageAttachment, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.BandwidthPackageId == nil {
return nil, errors.New("invalid value for required argument 'BandwidthPackageId'")
}
if args.LoadBalancerId == nil {
return nil, errors.New("invalid value for required argument 'LoadBalancerId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource LoadBalancerCommonBandwidthPackageAttachment
err := ctx.RegisterResource("alicloud:alb/loadBalancerCommonBandwidthPackageAttachment:LoadBalancerCommonBandwidthPackageAttachment", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetLoadBalancerCommonBandwidthPackageAttachment gets an existing LoadBalancerCommonBandwidthPackageAttachment resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetLoadBalancerCommonBandwidthPackageAttachment(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *LoadBalancerCommonBandwidthPackageAttachmentState, opts ...pulumi.ResourceOption) (*LoadBalancerCommonBandwidthPackageAttachment, error) {
var resource LoadBalancerCommonBandwidthPackageAttachment
err := ctx.ReadResource("alicloud:alb/loadBalancerCommonBandwidthPackageAttachment:LoadBalancerCommonBandwidthPackageAttachment", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering LoadBalancerCommonBandwidthPackageAttachment resources.
type loadBalancerCommonBandwidthPackageAttachmentState struct {
// The ID of the bound shared bandwidth package.
BandwidthPackageId *string `pulumi:"bandwidthPackageId"`
// Whether to PreCheck this request only. Value:-**true**: sends a check request and does not bind the shared bandwidth package to the load balancing instance. Check items include whether required parameters, request format, and business restrictions have been filled in. If the check fails, the corresponding error is returned. If the check passes, the error code 'DryRunOperation' is returned '.-**false** (default): Sends a normal request, returns the HTTP 2xx status code after the check, and directly performs the operation.
DryRun *bool `pulumi:"dryRun"`
// The ID of the applied server load balancer instance.
LoadBalancerId *string `pulumi:"loadBalancerId"`
// The status of the Application Load balancing instance. Value:-**Inactive**: Stopped, indicating that the instance listener will no longer forward traffic.-**Active**: running.-**Provisioning**: The project is being created.-**Configuring**: The configuration is being changed.-**CreateFailed**: The instance cannot be deleted without any charge.
Status *string `pulumi:"status"`
}
type LoadBalancerCommonBandwidthPackageAttachmentState struct {
// The ID of the bound shared bandwidth package.
BandwidthPackageId pulumi.StringPtrInput
// Whether to PreCheck this request only. Value:-**true**: sends a check request and does not bind the shared bandwidth package to the load balancing instance. Check items include whether required parameters, request format, and business restrictions have been filled in. If the check fails, the corresponding error is returned. If the check passes, the error code 'DryRunOperation' is returned '.-**false** (default): Sends a normal request, returns the HTTP 2xx status code after the check, and directly performs the operation.
DryRun pulumi.BoolPtrInput
// The ID of the applied server load balancer instance.
LoadBalancerId pulumi.StringPtrInput
// The status of the Application Load balancing instance. Value:-**Inactive**: Stopped, indicating that the instance listener will no longer forward traffic.-**Active**: running.-**Provisioning**: The project is being created.-**Configuring**: The configuration is being changed.-**CreateFailed**: The instance cannot be deleted without any charge.
Status pulumi.StringPtrInput
}
func (LoadBalancerCommonBandwidthPackageAttachmentState) ElementType() reflect.Type {
return reflect.TypeOf((*loadBalancerCommonBandwidthPackageAttachmentState)(nil)).Elem()
}
type loadBalancerCommonBandwidthPackageAttachmentArgs struct {
// The ID of the bound shared bandwidth package.
BandwidthPackageId string `pulumi:"bandwidthPackageId"`
// Whether to PreCheck this request only. Value:-**true**: sends a check request and does not bind the shared bandwidth package to the load balancing instance. Check items include whether required parameters, request format, and business restrictions have been filled in. If the check fails, the corresponding error is returned. If the check passes, the error code 'DryRunOperation' is returned '.-**false** (default): Sends a normal request, returns the HTTP 2xx status code after the check, and directly performs the operation.
DryRun *bool `pulumi:"dryRun"`
// The ID of the applied server load balancer instance.
LoadBalancerId string `pulumi:"loadBalancerId"`
}
// The set of arguments for constructing a LoadBalancerCommonBandwidthPackageAttachment resource.
type LoadBalancerCommonBandwidthPackageAttachmentArgs struct {
// The ID of the bound shared bandwidth package.
BandwidthPackageId pulumi.StringInput
// Whether to PreCheck this request only. Value:-**true**: sends a check request and does not bind the shared bandwidth package to the load balancing instance. Check items include whether required parameters, request format, and business restrictions have been filled in. If the check fails, the corresponding error is returned. If the check passes, the error code 'DryRunOperation' is returned '.-**false** (default): Sends a normal request, returns the HTTP 2xx status code after the check, and directly performs the operation.
DryRun pulumi.BoolPtrInput
// The ID of the applied server load balancer instance.
LoadBalancerId pulumi.StringInput
}
func (LoadBalancerCommonBandwidthPackageAttachmentArgs) ElementType() reflect.Type {
return reflect.TypeOf((*loadBalancerCommonBandwidthPackageAttachmentArgs)(nil)).Elem()
}
type LoadBalancerCommonBandwidthPackageAttachmentInput interface {
pulumi.Input
ToLoadBalancerCommonBandwidthPackageAttachmentOutput() LoadBalancerCommonBandwidthPackageAttachmentOutput
ToLoadBalancerCommonBandwidthPackageAttachmentOutputWithContext(ctx context.Context) LoadBalancerCommonBandwidthPackageAttachmentOutput
}
func (*LoadBalancerCommonBandwidthPackageAttachment) ElementType() reflect.Type {
return reflect.TypeOf((**LoadBalancerCommonBandwidthPackageAttachment)(nil)).Elem()
}
func (i *LoadBalancerCommonBandwidthPackageAttachment) ToLoadBalancerCommonBandwidthPackageAttachmentOutput() LoadBalancerCommonBandwidthPackageAttachmentOutput {
return i.ToLoadBalancerCommonBandwidthPackageAttachmentOutputWithContext(context.Background())
}
func (i *LoadBalancerCommonBandwidthPackageAttachment) ToLoadBalancerCommonBandwidthPackageAttachmentOutputWithContext(ctx context.Context) LoadBalancerCommonBandwidthPackageAttachmentOutput {
return pulumi.ToOutputWithContext(ctx, i).(LoadBalancerCommonBandwidthPackageAttachmentOutput)
}
// LoadBalancerCommonBandwidthPackageAttachmentArrayInput is an input type that accepts LoadBalancerCommonBandwidthPackageAttachmentArray and LoadBalancerCommonBandwidthPackageAttachmentArrayOutput values.
// You can construct a concrete instance of `LoadBalancerCommonBandwidthPackageAttachmentArrayInput` via:
//
// LoadBalancerCommonBandwidthPackageAttachmentArray{ LoadBalancerCommonBandwidthPackageAttachmentArgs{...} }
type LoadBalancerCommonBandwidthPackageAttachmentArrayInput interface {
pulumi.Input
ToLoadBalancerCommonBandwidthPackageAttachmentArrayOutput() LoadBalancerCommonBandwidthPackageAttachmentArrayOutput
ToLoadBalancerCommonBandwidthPackageAttachmentArrayOutputWithContext(context.Context) LoadBalancerCommonBandwidthPackageAttachmentArrayOutput
}
type LoadBalancerCommonBandwidthPackageAttachmentArray []LoadBalancerCommonBandwidthPackageAttachmentInput
func (LoadBalancerCommonBandwidthPackageAttachmentArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*LoadBalancerCommonBandwidthPackageAttachment)(nil)).Elem()
}
func (i LoadBalancerCommonBandwidthPackageAttachmentArray) ToLoadBalancerCommonBandwidthPackageAttachmentArrayOutput() LoadBalancerCommonBandwidthPackageAttachmentArrayOutput {
return i.ToLoadBalancerCommonBandwidthPackageAttachmentArrayOutputWithContext(context.Background())
}
func (i LoadBalancerCommonBandwidthPackageAttachmentArray) ToLoadBalancerCommonBandwidthPackageAttachmentArrayOutputWithContext(ctx context.Context) LoadBalancerCommonBandwidthPackageAttachmentArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(LoadBalancerCommonBandwidthPackageAttachmentArrayOutput)
}
// LoadBalancerCommonBandwidthPackageAttachmentMapInput is an input type that accepts LoadBalancerCommonBandwidthPackageAttachmentMap and LoadBalancerCommonBandwidthPackageAttachmentMapOutput values.
// You can construct a concrete instance of `LoadBalancerCommonBandwidthPackageAttachmentMapInput` via:
//
// LoadBalancerCommonBandwidthPackageAttachmentMap{ "key": LoadBalancerCommonBandwidthPackageAttachmentArgs{...} }
type LoadBalancerCommonBandwidthPackageAttachmentMapInput interface {
pulumi.Input
ToLoadBalancerCommonBandwidthPackageAttachmentMapOutput() LoadBalancerCommonBandwidthPackageAttachmentMapOutput
ToLoadBalancerCommonBandwidthPackageAttachmentMapOutputWithContext(context.Context) LoadBalancerCommonBandwidthPackageAttachmentMapOutput
}
type LoadBalancerCommonBandwidthPackageAttachmentMap map[string]LoadBalancerCommonBandwidthPackageAttachmentInput
func (LoadBalancerCommonBandwidthPackageAttachmentMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*LoadBalancerCommonBandwidthPackageAttachment)(nil)).Elem()
}
func (i LoadBalancerCommonBandwidthPackageAttachmentMap) ToLoadBalancerCommonBandwidthPackageAttachmentMapOutput() LoadBalancerCommonBandwidthPackageAttachmentMapOutput {
return i.ToLoadBalancerCommonBandwidthPackageAttachmentMapOutputWithContext(context.Background())
}
func (i LoadBalancerCommonBandwidthPackageAttachmentMap) ToLoadBalancerCommonBandwidthPackageAttachmentMapOutputWithContext(ctx context.Context) LoadBalancerCommonBandwidthPackageAttachmentMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(LoadBalancerCommonBandwidthPackageAttachmentMapOutput)
}
type LoadBalancerCommonBandwidthPackageAttachmentOutput struct{ *pulumi.OutputState }
func (LoadBalancerCommonBandwidthPackageAttachmentOutput) ElementType() reflect.Type {
return reflect.TypeOf((**LoadBalancerCommonBandwidthPackageAttachment)(nil)).Elem()
}
func (o LoadBalancerCommonBandwidthPackageAttachmentOutput) ToLoadBalancerCommonBandwidthPackageAttachmentOutput() LoadBalancerCommonBandwidthPackageAttachmentOutput {
return o
}
func (o LoadBalancerCommonBandwidthPackageAttachmentOutput) ToLoadBalancerCommonBandwidthPackageAttachmentOutputWithContext(ctx context.Context) LoadBalancerCommonBandwidthPackageAttachmentOutput {
return o
}
// The ID of the bound shared bandwidth package.
func (o LoadBalancerCommonBandwidthPackageAttachmentOutput) BandwidthPackageId() pulumi.StringOutput {
return o.ApplyT(func(v *LoadBalancerCommonBandwidthPackageAttachment) pulumi.StringOutput { return v.BandwidthPackageId }).(pulumi.StringOutput)
}
// Whether to PreCheck this request only. Value:-**true**: sends a check request and does not bind the shared bandwidth package to the load balancing instance. Check items include whether required parameters, request format, and business restrictions have been filled in. If the check fails, the corresponding error is returned. If the check passes, the error code 'DryRunOperation' is returned '.-**false** (default): Sends a normal request, returns the HTTP 2xx status code after the check, and directly performs the operation.
func (o LoadBalancerCommonBandwidthPackageAttachmentOutput) DryRun() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *LoadBalancerCommonBandwidthPackageAttachment) pulumi.BoolPtrOutput { return v.DryRun }).(pulumi.BoolPtrOutput)
}
// The ID of the applied server load balancer instance.
func (o LoadBalancerCommonBandwidthPackageAttachmentOutput) LoadBalancerId() pulumi.StringOutput {
return o.ApplyT(func(v *LoadBalancerCommonBandwidthPackageAttachment) pulumi.StringOutput { return v.LoadBalancerId }).(pulumi.StringOutput)
}
// The status of the Application Load balancing instance. Value:-**Inactive**: Stopped, indicating that the instance listener will no longer forward traffic.-**Active**: running.-**Provisioning**: The project is being created.-**Configuring**: The configuration is being changed.-**CreateFailed**: The instance cannot be deleted without any charge.
func (o LoadBalancerCommonBandwidthPackageAttachmentOutput) Status() pulumi.StringOutput {
return o.ApplyT(func(v *LoadBalancerCommonBandwidthPackageAttachment) pulumi.StringOutput { return v.Status }).(pulumi.StringOutput)
}
type LoadBalancerCommonBandwidthPackageAttachmentArrayOutput struct{ *pulumi.OutputState }
func (LoadBalancerCommonBandwidthPackageAttachmentArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*LoadBalancerCommonBandwidthPackageAttachment)(nil)).Elem()
}
func (o LoadBalancerCommonBandwidthPackageAttachmentArrayOutput) ToLoadBalancerCommonBandwidthPackageAttachmentArrayOutput() LoadBalancerCommonBandwidthPackageAttachmentArrayOutput {
return o
}
func (o LoadBalancerCommonBandwidthPackageAttachmentArrayOutput) ToLoadBalancerCommonBandwidthPackageAttachmentArrayOutputWithContext(ctx context.Context) LoadBalancerCommonBandwidthPackageAttachmentArrayOutput {
return o
}
func (o LoadBalancerCommonBandwidthPackageAttachmentArrayOutput) Index(i pulumi.IntInput) LoadBalancerCommonBandwidthPackageAttachmentOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *LoadBalancerCommonBandwidthPackageAttachment {
return vs[0].([]*LoadBalancerCommonBandwidthPackageAttachment)[vs[1].(int)]
}).(LoadBalancerCommonBandwidthPackageAttachmentOutput)
}
type LoadBalancerCommonBandwidthPackageAttachmentMapOutput struct{ *pulumi.OutputState }
func (LoadBalancerCommonBandwidthPackageAttachmentMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*LoadBalancerCommonBandwidthPackageAttachment)(nil)).Elem()
}
func (o LoadBalancerCommonBandwidthPackageAttachmentMapOutput) ToLoadBalancerCommonBandwidthPackageAttachmentMapOutput() LoadBalancerCommonBandwidthPackageAttachmentMapOutput {
return o
}
func (o LoadBalancerCommonBandwidthPackageAttachmentMapOutput) ToLoadBalancerCommonBandwidthPackageAttachmentMapOutputWithContext(ctx context.Context) LoadBalancerCommonBandwidthPackageAttachmentMapOutput {
return o
}
func (o LoadBalancerCommonBandwidthPackageAttachmentMapOutput) MapIndex(k pulumi.StringInput) LoadBalancerCommonBandwidthPackageAttachmentOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *LoadBalancerCommonBandwidthPackageAttachment {
return vs[0].(map[string]*LoadBalancerCommonBandwidthPackageAttachment)[vs[1].(string)]
}).(LoadBalancerCommonBandwidthPackageAttachmentOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*LoadBalancerCommonBandwidthPackageAttachmentInput)(nil)).Elem(), &LoadBalancerCommonBandwidthPackageAttachment{})
pulumi.RegisterInputType(reflect.TypeOf((*LoadBalancerCommonBandwidthPackageAttachmentArrayInput)(nil)).Elem(), LoadBalancerCommonBandwidthPackageAttachmentArray{})
pulumi.RegisterInputType(reflect.TypeOf((*LoadBalancerCommonBandwidthPackageAttachmentMapInput)(nil)).Elem(), LoadBalancerCommonBandwidthPackageAttachmentMap{})
pulumi.RegisterOutputType(LoadBalancerCommonBandwidthPackageAttachmentOutput{})
pulumi.RegisterOutputType(LoadBalancerCommonBandwidthPackageAttachmentArrayOutput{})
pulumi.RegisterOutputType(LoadBalancerCommonBandwidthPackageAttachmentMapOutput{})
}