This repository has been archived by the owner on Mar 11, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
supportPlanType.go
147 lines (123 loc) · 4.7 KB
/
supportPlanType.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
// *** WARNING: this file was generated by the Pulumi SDK Generator. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package v20180301
import (
"context"
"reflect"
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
// The status of the Canonical support plan.
type SupportPlanType struct {
pulumi.CustomResourceState
// The name of the Canonical support plan, i.e. "essential", "standard" or "advanced".
Name pulumi.StringOutput `pulumi:"name"`
// The provisioning state of the resource.
ProvisioningState pulumi.StringPtrOutput `pulumi:"provisioningState"`
// Microsoft.Addons/supportProvider
Type pulumi.StringOutput `pulumi:"type"`
}
// NewSupportPlanType registers a new resource with the given unique name, arguments, and options.
func NewSupportPlanType(ctx *pulumi.Context,
name string, args *SupportPlanTypeArgs, opts ...pulumi.ResourceOption) (*SupportPlanType, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.PlanTypeName == nil {
return nil, errors.New("invalid value for required argument 'PlanTypeName'")
}
if args.ProviderName == nil {
return nil, errors.New("invalid value for required argument 'ProviderName'")
}
aliases := pulumi.Aliases([]pulumi.Alias{
{
Type: pulumi.String("azure-nextgen:addons/latest:SupportPlanType"),
},
{
Type: pulumi.String("azure-nextgen:addons/v20170515:SupportPlanType"),
},
})
opts = append(opts, aliases)
var resource SupportPlanType
err := ctx.RegisterResource("azure-nextgen:addons/v20180301:SupportPlanType", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetSupportPlanType gets an existing SupportPlanType 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 GetSupportPlanType(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *SupportPlanTypeState, opts ...pulumi.ResourceOption) (*SupportPlanType, error) {
var resource SupportPlanType
err := ctx.ReadResource("azure-nextgen:addons/v20180301:SupportPlanType", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering SupportPlanType resources.
type supportPlanTypeState struct {
// The name of the Canonical support plan, i.e. "essential", "standard" or "advanced".
Name *string `pulumi:"name"`
// The provisioning state of the resource.
ProvisioningState *string `pulumi:"provisioningState"`
// Microsoft.Addons/supportProvider
Type *string `pulumi:"type"`
}
type SupportPlanTypeState struct {
// The name of the Canonical support plan, i.e. "essential", "standard" or "advanced".
Name pulumi.StringPtrInput
// The provisioning state of the resource.
ProvisioningState pulumi.StringPtrInput
// Microsoft.Addons/supportProvider
Type pulumi.StringPtrInput
}
func (SupportPlanTypeState) ElementType() reflect.Type {
return reflect.TypeOf((*supportPlanTypeState)(nil)).Elem()
}
type supportPlanTypeArgs struct {
// The Canonical support plan type.
PlanTypeName string `pulumi:"planTypeName"`
// The support plan type. For now the only valid type is "canonical".
ProviderName string `pulumi:"providerName"`
}
// The set of arguments for constructing a SupportPlanType resource.
type SupportPlanTypeArgs struct {
// The Canonical support plan type.
PlanTypeName pulumi.StringInput
// The support plan type. For now the only valid type is "canonical".
ProviderName pulumi.StringInput
}
func (SupportPlanTypeArgs) ElementType() reflect.Type {
return reflect.TypeOf((*supportPlanTypeArgs)(nil)).Elem()
}
type SupportPlanTypeInput interface {
pulumi.Input
ToSupportPlanTypeOutput() SupportPlanTypeOutput
ToSupportPlanTypeOutputWithContext(ctx context.Context) SupportPlanTypeOutput
}
func (*SupportPlanType) ElementType() reflect.Type {
return reflect.TypeOf((*SupportPlanType)(nil))
}
func (i *SupportPlanType) ToSupportPlanTypeOutput() SupportPlanTypeOutput {
return i.ToSupportPlanTypeOutputWithContext(context.Background())
}
func (i *SupportPlanType) ToSupportPlanTypeOutputWithContext(ctx context.Context) SupportPlanTypeOutput {
return pulumi.ToOutputWithContext(ctx, i).(SupportPlanTypeOutput)
}
type SupportPlanTypeOutput struct {
*pulumi.OutputState
}
func (SupportPlanTypeOutput) ElementType() reflect.Type {
return reflect.TypeOf((*SupportPlanType)(nil))
}
func (o SupportPlanTypeOutput) ToSupportPlanTypeOutput() SupportPlanTypeOutput {
return o
}
func (o SupportPlanTypeOutput) ToSupportPlanTypeOutputWithContext(ctx context.Context) SupportPlanTypeOutput {
return o
}
func init() {
pulumi.RegisterOutputType(SupportPlanTypeOutput{})
}