This repository has been archived by the owner on Mar 11, 2021. It is now read-only.
/
storageSyncService.go
197 lines (173 loc) · 7.78 KB
/
storageSyncService.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
// *** 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 v20180402
import (
"context"
"reflect"
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
// Storage Sync Service object.
type StorageSyncService struct {
pulumi.CustomResourceState
// The geo-location where the resource lives
Location pulumi.StringOutput `pulumi:"location"`
// The name of the resource
Name pulumi.StringOutput `pulumi:"name"`
// Storage Sync service status.
StorageSyncServiceStatus pulumi.IntOutput `pulumi:"storageSyncServiceStatus"`
// Storage Sync service Uid
StorageSyncServiceUid pulumi.StringOutput `pulumi:"storageSyncServiceUid"`
// Resource tags.
Tags pulumi.StringMapOutput `pulumi:"tags"`
// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
Type pulumi.StringOutput `pulumi:"type"`
}
// NewStorageSyncService registers a new resource with the given unique name, arguments, and options.
func NewStorageSyncService(ctx *pulumi.Context,
name string, args *StorageSyncServiceArgs, opts ...pulumi.ResourceOption) (*StorageSyncService, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.StorageSyncServiceName == nil {
return nil, errors.New("invalid value for required argument 'StorageSyncServiceName'")
}
aliases := pulumi.Aliases([]pulumi.Alias{
{
Type: pulumi.String("azure-nextgen:storagesync/latest:StorageSyncService"),
},
{
Type: pulumi.String("azure-nextgen:storagesync/v20170605preview:StorageSyncService"),
},
{
Type: pulumi.String("azure-nextgen:storagesync/v20180701:StorageSyncService"),
},
{
Type: pulumi.String("azure-nextgen:storagesync/v20181001:StorageSyncService"),
},
{
Type: pulumi.String("azure-nextgen:storagesync/v20190201:StorageSyncService"),
},
{
Type: pulumi.String("azure-nextgen:storagesync/v20190301:StorageSyncService"),
},
{
Type: pulumi.String("azure-nextgen:storagesync/v20190601:StorageSyncService"),
},
{
Type: pulumi.String("azure-nextgen:storagesync/v20191001:StorageSyncService"),
},
{
Type: pulumi.String("azure-nextgen:storagesync/v20200301:StorageSyncService"),
},
{
Type: pulumi.String("azure-nextgen:storagesync/v20200901:StorageSyncService"),
},
})
opts = append(opts, aliases)
var resource StorageSyncService
err := ctx.RegisterResource("azure-nextgen:storagesync/v20180402:StorageSyncService", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetStorageSyncService gets an existing StorageSyncService 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 GetStorageSyncService(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *StorageSyncServiceState, opts ...pulumi.ResourceOption) (*StorageSyncService, error) {
var resource StorageSyncService
err := ctx.ReadResource("azure-nextgen:storagesync/v20180402:StorageSyncService", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering StorageSyncService resources.
type storageSyncServiceState struct {
// The geo-location where the resource lives
Location *string `pulumi:"location"`
// The name of the resource
Name *string `pulumi:"name"`
// Storage Sync service status.
StorageSyncServiceStatus *int `pulumi:"storageSyncServiceStatus"`
// Storage Sync service Uid
StorageSyncServiceUid *string `pulumi:"storageSyncServiceUid"`
// Resource tags.
Tags map[string]string `pulumi:"tags"`
// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
Type *string `pulumi:"type"`
}
type StorageSyncServiceState struct {
// The geo-location where the resource lives
Location pulumi.StringPtrInput
// The name of the resource
Name pulumi.StringPtrInput
// Storage Sync service status.
StorageSyncServiceStatus pulumi.IntPtrInput
// Storage Sync service Uid
StorageSyncServiceUid pulumi.StringPtrInput
// Resource tags.
Tags pulumi.StringMapInput
// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
Type pulumi.StringPtrInput
}
func (StorageSyncServiceState) ElementType() reflect.Type {
return reflect.TypeOf((*storageSyncServiceState)(nil)).Elem()
}
type storageSyncServiceArgs struct {
// Required. Gets or sets the location of the resource. This will be one of the supported and registered Azure Geo Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a resource cannot be changed once it is created, but if an identical geo region is specified on update, the request will succeed.
Location *string `pulumi:"location"`
// The name of the resource group. The name is case insensitive.
ResourceGroupName string `pulumi:"resourceGroupName"`
// Name of Storage Sync Service resource.
StorageSyncServiceName string `pulumi:"storageSyncServiceName"`
// Gets or sets a list of key value pairs that describe the resource. These tags can be used for viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key with a length no greater than 128 characters and a value with a length no greater than 256 characters.
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a StorageSyncService resource.
type StorageSyncServiceArgs struct {
// Required. Gets or sets the location of the resource. This will be one of the supported and registered Azure Geo Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a resource cannot be changed once it is created, but if an identical geo region is specified on update, the request will succeed.
Location pulumi.StringPtrInput
// The name of the resource group. The name is case insensitive.
ResourceGroupName pulumi.StringInput
// Name of Storage Sync Service resource.
StorageSyncServiceName pulumi.StringInput
// Gets or sets a list of key value pairs that describe the resource. These tags can be used for viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key with a length no greater than 128 characters and a value with a length no greater than 256 characters.
Tags pulumi.StringMapInput
}
func (StorageSyncServiceArgs) ElementType() reflect.Type {
return reflect.TypeOf((*storageSyncServiceArgs)(nil)).Elem()
}
type StorageSyncServiceInput interface {
pulumi.Input
ToStorageSyncServiceOutput() StorageSyncServiceOutput
ToStorageSyncServiceOutputWithContext(ctx context.Context) StorageSyncServiceOutput
}
func (*StorageSyncService) ElementType() reflect.Type {
return reflect.TypeOf((*StorageSyncService)(nil))
}
func (i *StorageSyncService) ToStorageSyncServiceOutput() StorageSyncServiceOutput {
return i.ToStorageSyncServiceOutputWithContext(context.Background())
}
func (i *StorageSyncService) ToStorageSyncServiceOutputWithContext(ctx context.Context) StorageSyncServiceOutput {
return pulumi.ToOutputWithContext(ctx, i).(StorageSyncServiceOutput)
}
type StorageSyncServiceOutput struct {
*pulumi.OutputState
}
func (StorageSyncServiceOutput) ElementType() reflect.Type {
return reflect.TypeOf((*StorageSyncService)(nil))
}
func (o StorageSyncServiceOutput) ToStorageSyncServiceOutput() StorageSyncServiceOutput {
return o
}
func (o StorageSyncServiceOutput) ToStorageSyncServiceOutputWithContext(ctx context.Context) StorageSyncServiceOutput {
return o
}
func init() {
pulumi.RegisterOutputType(StorageSyncServiceOutput{})
}