This repository has been archived by the owner on Mar 11, 2021. It is now read-only.
/
protectionContainer.go
201 lines (177 loc) · 6.77 KB
/
protectionContainer.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
// *** 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 v20201201
import (
"context"
"reflect"
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
// Base class for container with backup items. Containers with specific workloads are derived from this class.
type ProtectionContainer struct {
pulumi.CustomResourceState
// Optional ETag.
ETag pulumi.StringPtrOutput `pulumi:"eTag"`
// Resource location.
Location pulumi.StringPtrOutput `pulumi:"location"`
// Resource name associated with the resource.
Name pulumi.StringOutput `pulumi:"name"`
// ProtectionContainerResource properties
Properties pulumi.AnyOutput `pulumi:"properties"`
// Resource tags.
Tags pulumi.StringMapOutput `pulumi:"tags"`
// Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/...
Type pulumi.StringOutput `pulumi:"type"`
}
// NewProtectionContainer registers a new resource with the given unique name, arguments, and options.
func NewProtectionContainer(ctx *pulumi.Context,
name string, args *ProtectionContainerArgs, opts ...pulumi.ResourceOption) (*ProtectionContainer, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ContainerName == nil {
return nil, errors.New("invalid value for required argument 'ContainerName'")
}
if args.FabricName == nil {
return nil, errors.New("invalid value for required argument 'FabricName'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.VaultName == nil {
return nil, errors.New("invalid value for required argument 'VaultName'")
}
aliases := pulumi.Aliases([]pulumi.Alias{
{
Type: pulumi.String("azure-nextgen:recoveryservices/latest:ProtectionContainer"),
},
{
Type: pulumi.String("azure-nextgen:recoveryservices/v20161201:ProtectionContainer"),
},
{
Type: pulumi.String("azure-nextgen:recoveryservices/v20201001:ProtectionContainer"),
},
{
Type: pulumi.String("azure-nextgen:recoveryservices/v20210101:ProtectionContainer"),
},
})
opts = append(opts, aliases)
var resource ProtectionContainer
err := ctx.RegisterResource("azure-nextgen:recoveryservices/v20201201:ProtectionContainer", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetProtectionContainer gets an existing ProtectionContainer 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 GetProtectionContainer(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ProtectionContainerState, opts ...pulumi.ResourceOption) (*ProtectionContainer, error) {
var resource ProtectionContainer
err := ctx.ReadResource("azure-nextgen:recoveryservices/v20201201:ProtectionContainer", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ProtectionContainer resources.
type protectionContainerState struct {
// Optional ETag.
ETag *string `pulumi:"eTag"`
// Resource location.
Location *string `pulumi:"location"`
// Resource name associated with the resource.
Name *string `pulumi:"name"`
// ProtectionContainerResource properties
Properties interface{} `pulumi:"properties"`
// Resource tags.
Tags map[string]string `pulumi:"tags"`
// Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/...
Type *string `pulumi:"type"`
}
type ProtectionContainerState struct {
// Optional ETag.
ETag pulumi.StringPtrInput
// Resource location.
Location pulumi.StringPtrInput
// Resource name associated with the resource.
Name pulumi.StringPtrInput
// ProtectionContainerResource properties
Properties pulumi.Input
// Resource tags.
Tags pulumi.StringMapInput
// Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/...
Type pulumi.StringPtrInput
}
func (ProtectionContainerState) ElementType() reflect.Type {
return reflect.TypeOf((*protectionContainerState)(nil)).Elem()
}
type protectionContainerArgs struct {
// Name of the container to be registered.
ContainerName string `pulumi:"containerName"`
// Optional ETag.
ETag *string `pulumi:"eTag"`
// Fabric name associated with the container.
FabricName string `pulumi:"fabricName"`
// Resource location.
Location *string `pulumi:"location"`
// ProtectionContainerResource properties
Properties interface{} `pulumi:"properties"`
// The name of the resource group where the recovery services vault is present.
ResourceGroupName string `pulumi:"resourceGroupName"`
// Resource tags.
Tags map[string]string `pulumi:"tags"`
// The name of the recovery services vault.
VaultName string `pulumi:"vaultName"`
}
// The set of arguments for constructing a ProtectionContainer resource.
type ProtectionContainerArgs struct {
// Name of the container to be registered.
ContainerName pulumi.StringInput
// Optional ETag.
ETag pulumi.StringPtrInput
// Fabric name associated with the container.
FabricName pulumi.StringInput
// Resource location.
Location pulumi.StringPtrInput
// ProtectionContainerResource properties
Properties pulumi.Input
// The name of the resource group where the recovery services vault is present.
ResourceGroupName pulumi.StringInput
// Resource tags.
Tags pulumi.StringMapInput
// The name of the recovery services vault.
VaultName pulumi.StringInput
}
func (ProtectionContainerArgs) ElementType() reflect.Type {
return reflect.TypeOf((*protectionContainerArgs)(nil)).Elem()
}
type ProtectionContainerInput interface {
pulumi.Input
ToProtectionContainerOutput() ProtectionContainerOutput
ToProtectionContainerOutputWithContext(ctx context.Context) ProtectionContainerOutput
}
func (*ProtectionContainer) ElementType() reflect.Type {
return reflect.TypeOf((*ProtectionContainer)(nil))
}
func (i *ProtectionContainer) ToProtectionContainerOutput() ProtectionContainerOutput {
return i.ToProtectionContainerOutputWithContext(context.Background())
}
func (i *ProtectionContainer) ToProtectionContainerOutputWithContext(ctx context.Context) ProtectionContainerOutput {
return pulumi.ToOutputWithContext(ctx, i).(ProtectionContainerOutput)
}
type ProtectionContainerOutput struct {
*pulumi.OutputState
}
func (ProtectionContainerOutput) ElementType() reflect.Type {
return reflect.TypeOf((*ProtectionContainer)(nil))
}
func (o ProtectionContainerOutput) ToProtectionContainerOutput() ProtectionContainerOutput {
return o
}
func (o ProtectionContainerOutput) ToProtectionContainerOutputWithContext(ctx context.Context) ProtectionContainerOutput {
return o
}
func init() {
pulumi.RegisterOutputType(ProtectionContainerOutput{})
}