/
jobCollection.go
147 lines (133 loc) · 7.4 KB
/
jobCollection.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
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
// nolint: lll
package scheduler
import (
"reflect"
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/go/pulumi"
)
// Manages a Scheduler Job Collection.
//
// > **NOTE:** Support for Scheduler Job Collections has been deprecated by Microsoft in favour of Logic Apps ([more information can be found at this link](https://docs.microsoft.com/en-us/azure/scheduler/migrate-from-scheduler-to-logic-apps)) - as such we plan to remove support for this resource as a part of version 2.0 of the AzureRM Provider.
//
// > This content is derived from https://github.com/terraform-providers/terraform-provider-azurerm/blob/master/website/docs/r/scheduler_job_collection.html.markdown.
type JobCollection struct {
pulumi.CustomResourceState
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringOutput `pulumi:"location"`
// Specifies the name of the Scheduler Job Collection. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Configures the Job collection quotas as documented in the `quota` block below.
Quota JobCollectionQuotaPtrOutput `pulumi:"quota"`
// The name of the resource group in which to create the Scheduler Job Collection. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// Sets the Job Collection's pricing level's SKU. Possible values include: `Standard`, `Free`, `P10Premium`, `P20Premium`.
Sku pulumi.StringOutput `pulumi:"sku"`
// Sets Job Collection's state. Possible values include: `Enabled`, `Disabled`, `Suspended`.
State pulumi.StringPtrOutput `pulumi:"state"`
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapOutput `pulumi:"tags"`
}
// NewJobCollection registers a new resource with the given unique name, arguments, and options.
func NewJobCollection(ctx *pulumi.Context,
name string, args *JobCollectionArgs, opts ...pulumi.ResourceOption) (*JobCollection, error) {
if args == nil || args.ResourceGroupName == nil {
return nil, errors.New("missing required argument 'ResourceGroupName'")
}
if args == nil || args.Sku == nil {
return nil, errors.New("missing required argument 'Sku'")
}
if args == nil {
args = &JobCollectionArgs{}
}
var resource JobCollection
err := ctx.RegisterResource("azure:scheduler/jobCollection:JobCollection", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetJobCollection gets an existing JobCollection 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 GetJobCollection(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *JobCollectionState, opts ...pulumi.ResourceOption) (*JobCollection, error) {
var resource JobCollection
err := ctx.ReadResource("azure:scheduler/jobCollection:JobCollection", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering JobCollection resources.
type jobCollectionState struct {
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// Specifies the name of the Scheduler Job Collection. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Configures the Job collection quotas as documented in the `quota` block below.
Quota *JobCollectionQuota `pulumi:"quota"`
// The name of the resource group in which to create the Scheduler Job Collection. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// Sets the Job Collection's pricing level's SKU. Possible values include: `Standard`, `Free`, `P10Premium`, `P20Premium`.
Sku *string `pulumi:"sku"`
// Sets Job Collection's state. Possible values include: `Enabled`, `Disabled`, `Suspended`.
State *string `pulumi:"state"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
}
type JobCollectionState struct {
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// Specifies the name of the Scheduler Job Collection. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Configures the Job collection quotas as documented in the `quota` block below.
Quota JobCollectionQuotaPtrInput
// The name of the resource group in which to create the Scheduler Job Collection. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// Sets the Job Collection's pricing level's SKU. Possible values include: `Standard`, `Free`, `P10Premium`, `P20Premium`.
Sku pulumi.StringPtrInput
// Sets Job Collection's state. Possible values include: `Enabled`, `Disabled`, `Suspended`.
State pulumi.StringPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
}
func (JobCollectionState) ElementType() reflect.Type {
return reflect.TypeOf((*jobCollectionState)(nil)).Elem()
}
type jobCollectionArgs struct {
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// Specifies the name of the Scheduler Job Collection. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Configures the Job collection quotas as documented in the `quota` block below.
Quota *JobCollectionQuota `pulumi:"quota"`
// The name of the resource group in which to create the Scheduler Job Collection. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// Sets the Job Collection's pricing level's SKU. Possible values include: `Standard`, `Free`, `P10Premium`, `P20Premium`.
Sku string `pulumi:"sku"`
// Sets Job Collection's state. Possible values include: `Enabled`, `Disabled`, `Suspended`.
State *string `pulumi:"state"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a JobCollection resource.
type JobCollectionArgs struct {
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// Specifies the name of the Scheduler Job Collection. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Configures the Job collection quotas as documented in the `quota` block below.
Quota JobCollectionQuotaPtrInput
// The name of the resource group in which to create the Scheduler Job Collection. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// Sets the Job Collection's pricing level's SKU. Possible values include: `Standard`, `Free`, `P10Premium`, `P20Premium`.
Sku pulumi.StringInput
// Sets Job Collection's state. Possible values include: `Enabled`, `Disabled`, `Suspended`.
State pulumi.StringPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
}
func (JobCollectionArgs) ElementType() reflect.Type {
return reflect.TypeOf((*jobCollectionArgs)(nil)).Elem()
}