forked from pulumi/pulumi-azure-native-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
registeredPrefix.go
205 lines (174 loc) · 7.21 KB
/
registeredPrefix.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
// Code generated by the Pulumi SDK Generator DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package peering
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure-native-sdk/v2/utilities"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// The customer's prefix that is registered by the peering service provider.
// Azure REST API version: 2022-10-01. Prior API version in Azure Native 1.x: 2021-01-01.
type RegisteredPrefix struct {
pulumi.CustomResourceState
// The error message associated with the validation state, if any.
ErrorMessage pulumi.StringOutput `pulumi:"errorMessage"`
// The name of the resource.
Name pulumi.StringOutput `pulumi:"name"`
// The peering service prefix key that is to be shared with the customer.
PeeringServicePrefixKey pulumi.StringOutput `pulumi:"peeringServicePrefixKey"`
// The customer's prefix from which traffic originates.
Prefix pulumi.StringPtrOutput `pulumi:"prefix"`
// The prefix validation state.
PrefixValidationState pulumi.StringOutput `pulumi:"prefixValidationState"`
// The provisioning state of the resource.
ProvisioningState pulumi.StringOutput `pulumi:"provisioningState"`
// The type of the resource.
Type pulumi.StringOutput `pulumi:"type"`
}
// NewRegisteredPrefix registers a new resource with the given unique name, arguments, and options.
func NewRegisteredPrefix(ctx *pulumi.Context,
name string, args *RegisteredPrefixArgs, opts ...pulumi.ResourceOption) (*RegisteredPrefix, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.PeeringName == nil {
return nil, errors.New("invalid value for required argument 'PeeringName'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
aliases := pulumi.Aliases([]pulumi.Alias{
{
Type: pulumi.String("azure-native:peering/v20200101preview:RegisteredPrefix"),
},
{
Type: pulumi.String("azure-native:peering/v20200401:RegisteredPrefix"),
},
{
Type: pulumi.String("azure-native:peering/v20201001:RegisteredPrefix"),
},
{
Type: pulumi.String("azure-native:peering/v20210101:RegisteredPrefix"),
},
{
Type: pulumi.String("azure-native:peering/v20210601:RegisteredPrefix"),
},
{
Type: pulumi.String("azure-native:peering/v20220101:RegisteredPrefix"),
},
{
Type: pulumi.String("azure-native:peering/v20220601:RegisteredPrefix"),
},
{
Type: pulumi.String("azure-native:peering/v20221001:RegisteredPrefix"),
},
})
opts = append(opts, aliases)
opts = utilities.PkgResourceDefaultOpts(opts)
var resource RegisteredPrefix
err := ctx.RegisterResource("azure-native:peering:RegisteredPrefix", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetRegisteredPrefix gets an existing RegisteredPrefix 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 GetRegisteredPrefix(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *RegisteredPrefixState, opts ...pulumi.ResourceOption) (*RegisteredPrefix, error) {
var resource RegisteredPrefix
err := ctx.ReadResource("azure-native:peering:RegisteredPrefix", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering RegisteredPrefix resources.
type registeredPrefixState struct {
}
type RegisteredPrefixState struct {
}
func (RegisteredPrefixState) ElementType() reflect.Type {
return reflect.TypeOf((*registeredPrefixState)(nil)).Elem()
}
type registeredPrefixArgs struct {
// The name of the peering.
PeeringName string `pulumi:"peeringName"`
// The customer's prefix from which traffic originates.
Prefix *string `pulumi:"prefix"`
// The name of the registered prefix.
RegisteredPrefixName *string `pulumi:"registeredPrefixName"`
// The name of the resource group.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// The set of arguments for constructing a RegisteredPrefix resource.
type RegisteredPrefixArgs struct {
// The name of the peering.
PeeringName pulumi.StringInput
// The customer's prefix from which traffic originates.
Prefix pulumi.StringPtrInput
// The name of the registered prefix.
RegisteredPrefixName pulumi.StringPtrInput
// The name of the resource group.
ResourceGroupName pulumi.StringInput
}
func (RegisteredPrefixArgs) ElementType() reflect.Type {
return reflect.TypeOf((*registeredPrefixArgs)(nil)).Elem()
}
type RegisteredPrefixInput interface {
pulumi.Input
ToRegisteredPrefixOutput() RegisteredPrefixOutput
ToRegisteredPrefixOutputWithContext(ctx context.Context) RegisteredPrefixOutput
}
func (*RegisteredPrefix) ElementType() reflect.Type {
return reflect.TypeOf((**RegisteredPrefix)(nil)).Elem()
}
func (i *RegisteredPrefix) ToRegisteredPrefixOutput() RegisteredPrefixOutput {
return i.ToRegisteredPrefixOutputWithContext(context.Background())
}
func (i *RegisteredPrefix) ToRegisteredPrefixOutputWithContext(ctx context.Context) RegisteredPrefixOutput {
return pulumi.ToOutputWithContext(ctx, i).(RegisteredPrefixOutput)
}
type RegisteredPrefixOutput struct{ *pulumi.OutputState }
func (RegisteredPrefixOutput) ElementType() reflect.Type {
return reflect.TypeOf((**RegisteredPrefix)(nil)).Elem()
}
func (o RegisteredPrefixOutput) ToRegisteredPrefixOutput() RegisteredPrefixOutput {
return o
}
func (o RegisteredPrefixOutput) ToRegisteredPrefixOutputWithContext(ctx context.Context) RegisteredPrefixOutput {
return o
}
// The error message associated with the validation state, if any.
func (o RegisteredPrefixOutput) ErrorMessage() pulumi.StringOutput {
return o.ApplyT(func(v *RegisteredPrefix) pulumi.StringOutput { return v.ErrorMessage }).(pulumi.StringOutput)
}
// The name of the resource.
func (o RegisteredPrefixOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *RegisteredPrefix) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The peering service prefix key that is to be shared with the customer.
func (o RegisteredPrefixOutput) PeeringServicePrefixKey() pulumi.StringOutput {
return o.ApplyT(func(v *RegisteredPrefix) pulumi.StringOutput { return v.PeeringServicePrefixKey }).(pulumi.StringOutput)
}
// The customer's prefix from which traffic originates.
func (o RegisteredPrefixOutput) Prefix() pulumi.StringPtrOutput {
return o.ApplyT(func(v *RegisteredPrefix) pulumi.StringPtrOutput { return v.Prefix }).(pulumi.StringPtrOutput)
}
// The prefix validation state.
func (o RegisteredPrefixOutput) PrefixValidationState() pulumi.StringOutput {
return o.ApplyT(func(v *RegisteredPrefix) pulumi.StringOutput { return v.PrefixValidationState }).(pulumi.StringOutput)
}
// The provisioning state of the resource.
func (o RegisteredPrefixOutput) ProvisioningState() pulumi.StringOutput {
return o.ApplyT(func(v *RegisteredPrefix) pulumi.StringOutput { return v.ProvisioningState }).(pulumi.StringOutput)
}
// The type of the resource.
func (o RegisteredPrefixOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v *RegisteredPrefix) pulumi.StringOutput { return v.Type }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(RegisteredPrefixOutput{})
}