forked from pulumi/pulumi-azure-native-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
reportByResourceGroupName.go
195 lines (164 loc) · 7.34 KB
/
reportByResourceGroupName.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
// 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 costmanagement
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure-native-sdk/v2/utilities"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// A report resource.
// Azure REST API version: 2018-08-01-preview. Prior API version in Azure Native 1.x: 2018-08-01-preview.
type ReportByResourceGroupName struct {
pulumi.CustomResourceState
// Has definition for the report.
Definition ReportDefinitionResponseOutput `pulumi:"definition"`
// Has delivery information for the report.
DeliveryInfo ReportDeliveryInfoResponseOutput `pulumi:"deliveryInfo"`
// The format of the report being delivered.
Format pulumi.StringPtrOutput `pulumi:"format"`
// Resource name.
Name pulumi.StringOutput `pulumi:"name"`
// Has schedule information for the report.
Schedule ReportScheduleResponsePtrOutput `pulumi:"schedule"`
// Resource tags.
Tags pulumi.StringMapOutput `pulumi:"tags"`
// Resource type.
Type pulumi.StringOutput `pulumi:"type"`
}
// NewReportByResourceGroupName registers a new resource with the given unique name, arguments, and options.
func NewReportByResourceGroupName(ctx *pulumi.Context,
name string, args *ReportByResourceGroupNameArgs, opts ...pulumi.ResourceOption) (*ReportByResourceGroupName, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.Definition == nil {
return nil, errors.New("invalid value for required argument 'Definition'")
}
if args.DeliveryInfo == nil {
return nil, errors.New("invalid value for required argument 'DeliveryInfo'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
aliases := pulumi.Aliases([]pulumi.Alias{
{
Type: pulumi.String("azure-native:costmanagement/v20180801preview:ReportByResourceGroupName"),
},
})
opts = append(opts, aliases)
opts = utilities.PkgResourceDefaultOpts(opts)
var resource ReportByResourceGroupName
err := ctx.RegisterResource("azure-native:costmanagement:ReportByResourceGroupName", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetReportByResourceGroupName gets an existing ReportByResourceGroupName 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 GetReportByResourceGroupName(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ReportByResourceGroupNameState, opts ...pulumi.ResourceOption) (*ReportByResourceGroupName, error) {
var resource ReportByResourceGroupName
err := ctx.ReadResource("azure-native:costmanagement:ReportByResourceGroupName", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ReportByResourceGroupName resources.
type reportByResourceGroupNameState struct {
}
type ReportByResourceGroupNameState struct {
}
func (ReportByResourceGroupNameState) ElementType() reflect.Type {
return reflect.TypeOf((*reportByResourceGroupNameState)(nil)).Elem()
}
type reportByResourceGroupNameArgs struct {
// Has definition for the report.
Definition ReportDefinition `pulumi:"definition"`
// Has delivery information for the report.
DeliveryInfo ReportDeliveryInfo `pulumi:"deliveryInfo"`
// The format of the report being delivered.
Format *string `pulumi:"format"`
// Report Name.
ReportName *string `pulumi:"reportName"`
// Azure Resource Group Name.
ResourceGroupName string `pulumi:"resourceGroupName"`
// Has schedule information for the report.
Schedule *ReportSchedule `pulumi:"schedule"`
}
// The set of arguments for constructing a ReportByResourceGroupName resource.
type ReportByResourceGroupNameArgs struct {
// Has definition for the report.
Definition ReportDefinitionInput
// Has delivery information for the report.
DeliveryInfo ReportDeliveryInfoInput
// The format of the report being delivered.
Format pulumi.StringPtrInput
// Report Name.
ReportName pulumi.StringPtrInput
// Azure Resource Group Name.
ResourceGroupName pulumi.StringInput
// Has schedule information for the report.
Schedule ReportSchedulePtrInput
}
func (ReportByResourceGroupNameArgs) ElementType() reflect.Type {
return reflect.TypeOf((*reportByResourceGroupNameArgs)(nil)).Elem()
}
type ReportByResourceGroupNameInput interface {
pulumi.Input
ToReportByResourceGroupNameOutput() ReportByResourceGroupNameOutput
ToReportByResourceGroupNameOutputWithContext(ctx context.Context) ReportByResourceGroupNameOutput
}
func (*ReportByResourceGroupName) ElementType() reflect.Type {
return reflect.TypeOf((**ReportByResourceGroupName)(nil)).Elem()
}
func (i *ReportByResourceGroupName) ToReportByResourceGroupNameOutput() ReportByResourceGroupNameOutput {
return i.ToReportByResourceGroupNameOutputWithContext(context.Background())
}
func (i *ReportByResourceGroupName) ToReportByResourceGroupNameOutputWithContext(ctx context.Context) ReportByResourceGroupNameOutput {
return pulumi.ToOutputWithContext(ctx, i).(ReportByResourceGroupNameOutput)
}
type ReportByResourceGroupNameOutput struct{ *pulumi.OutputState }
func (ReportByResourceGroupNameOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ReportByResourceGroupName)(nil)).Elem()
}
func (o ReportByResourceGroupNameOutput) ToReportByResourceGroupNameOutput() ReportByResourceGroupNameOutput {
return o
}
func (o ReportByResourceGroupNameOutput) ToReportByResourceGroupNameOutputWithContext(ctx context.Context) ReportByResourceGroupNameOutput {
return o
}
// Has definition for the report.
func (o ReportByResourceGroupNameOutput) Definition() ReportDefinitionResponseOutput {
return o.ApplyT(func(v *ReportByResourceGroupName) ReportDefinitionResponseOutput { return v.Definition }).(ReportDefinitionResponseOutput)
}
// Has delivery information for the report.
func (o ReportByResourceGroupNameOutput) DeliveryInfo() ReportDeliveryInfoResponseOutput {
return o.ApplyT(func(v *ReportByResourceGroupName) ReportDeliveryInfoResponseOutput { return v.DeliveryInfo }).(ReportDeliveryInfoResponseOutput)
}
// The format of the report being delivered.
func (o ReportByResourceGroupNameOutput) Format() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ReportByResourceGroupName) pulumi.StringPtrOutput { return v.Format }).(pulumi.StringPtrOutput)
}
// Resource name.
func (o ReportByResourceGroupNameOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *ReportByResourceGroupName) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Has schedule information for the report.
func (o ReportByResourceGroupNameOutput) Schedule() ReportScheduleResponsePtrOutput {
return o.ApplyT(func(v *ReportByResourceGroupName) ReportScheduleResponsePtrOutput { return v.Schedule }).(ReportScheduleResponsePtrOutput)
}
// Resource tags.
func (o ReportByResourceGroupNameOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *ReportByResourceGroupName) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
// Resource type.
func (o ReportByResourceGroupNameOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v *ReportByResourceGroupName) pulumi.StringOutput { return v.Type }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(ReportByResourceGroupNameOutput{})
}