forked from pulumi/pulumi-azure-native-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
billingRoleAssignmentByDepartment.go
235 lines (199 loc) · 11.8 KB
/
billingRoleAssignmentByDepartment.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
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
// 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 billing
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure-native-sdk/v2/utilities"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// The role assignment
// Azure REST API version: 2019-10-01-preview. Prior API version in Azure Native 1.x: 2019-10-01-preview.
type BillingRoleAssignmentByDepartment struct {
pulumi.CustomResourceState
// The principal Id of the user who created the role assignment.
CreatedByPrincipalId pulumi.StringOutput `pulumi:"createdByPrincipalId"`
// The tenant Id of the user who created the role assignment.
CreatedByPrincipalTenantId pulumi.StringOutput `pulumi:"createdByPrincipalTenantId"`
// The email address of the user who created the role assignment. This is supported only for billing accounts with agreement type Enterprise Agreement.
CreatedByUserEmailAddress pulumi.StringOutput `pulumi:"createdByUserEmailAddress"`
// The date the role assignment was created.
CreatedOn pulumi.StringOutput `pulumi:"createdOn"`
// Resource name.
Name pulumi.StringOutput `pulumi:"name"`
// The principal id of the user to whom the role was assigned.
PrincipalId pulumi.StringPtrOutput `pulumi:"principalId"`
// The principal tenant id of the user to whom the role was assigned.
PrincipalTenantId pulumi.StringPtrOutput `pulumi:"principalTenantId"`
// The ID of the role definition.
RoleDefinitionId pulumi.StringPtrOutput `pulumi:"roleDefinitionId"`
// The scope at which the role was assigned.
Scope pulumi.StringOutput `pulumi:"scope"`
// Resource type.
Type pulumi.StringOutput `pulumi:"type"`
// The authentication type of the user, whether Organization or MSA, of the user to whom the role was assigned. This is supported only for billing accounts with agreement type Enterprise Agreement.
UserAuthenticationType pulumi.StringPtrOutput `pulumi:"userAuthenticationType"`
// The email address of the user to whom the role was assigned. This is supported only for billing accounts with agreement type Enterprise Agreement.
UserEmailAddress pulumi.StringPtrOutput `pulumi:"userEmailAddress"`
}
// NewBillingRoleAssignmentByDepartment registers a new resource with the given unique name, arguments, and options.
func NewBillingRoleAssignmentByDepartment(ctx *pulumi.Context,
name string, args *BillingRoleAssignmentByDepartmentArgs, opts ...pulumi.ResourceOption) (*BillingRoleAssignmentByDepartment, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.BillingAccountName == nil {
return nil, errors.New("invalid value for required argument 'BillingAccountName'")
}
if args.DepartmentName == nil {
return nil, errors.New("invalid value for required argument 'DepartmentName'")
}
aliases := pulumi.Aliases([]pulumi.Alias{
{
Type: pulumi.String("azure-native:billing/v20191001preview:BillingRoleAssignmentByDepartment"),
},
})
opts = append(opts, aliases)
opts = utilities.PkgResourceDefaultOpts(opts)
var resource BillingRoleAssignmentByDepartment
err := ctx.RegisterResource("azure-native:billing:BillingRoleAssignmentByDepartment", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetBillingRoleAssignmentByDepartment gets an existing BillingRoleAssignmentByDepartment 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 GetBillingRoleAssignmentByDepartment(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *BillingRoleAssignmentByDepartmentState, opts ...pulumi.ResourceOption) (*BillingRoleAssignmentByDepartment, error) {
var resource BillingRoleAssignmentByDepartment
err := ctx.ReadResource("azure-native:billing:BillingRoleAssignmentByDepartment", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering BillingRoleAssignmentByDepartment resources.
type billingRoleAssignmentByDepartmentState struct {
}
type BillingRoleAssignmentByDepartmentState struct {
}
func (BillingRoleAssignmentByDepartmentState) ElementType() reflect.Type {
return reflect.TypeOf((*billingRoleAssignmentByDepartmentState)(nil)).Elem()
}
type billingRoleAssignmentByDepartmentArgs struct {
// The ID that uniquely identifies a billing account.
BillingAccountName string `pulumi:"billingAccountName"`
// The ID that uniquely identifies a role assignment.
BillingRoleAssignmentName *string `pulumi:"billingRoleAssignmentName"`
// The ID that uniquely identifies a department.
DepartmentName string `pulumi:"departmentName"`
// The principal id of the user to whom the role was assigned.
PrincipalId *string `pulumi:"principalId"`
// The principal tenant id of the user to whom the role was assigned.
PrincipalTenantId *string `pulumi:"principalTenantId"`
// The ID of the role definition.
RoleDefinitionId *string `pulumi:"roleDefinitionId"`
// The authentication type of the user, whether Organization or MSA, of the user to whom the role was assigned. This is supported only for billing accounts with agreement type Enterprise Agreement.
UserAuthenticationType *string `pulumi:"userAuthenticationType"`
// The email address of the user to whom the role was assigned. This is supported only for billing accounts with agreement type Enterprise Agreement.
UserEmailAddress *string `pulumi:"userEmailAddress"`
}
// The set of arguments for constructing a BillingRoleAssignmentByDepartment resource.
type BillingRoleAssignmentByDepartmentArgs struct {
// The ID that uniquely identifies a billing account.
BillingAccountName pulumi.StringInput
// The ID that uniquely identifies a role assignment.
BillingRoleAssignmentName pulumi.StringPtrInput
// The ID that uniquely identifies a department.
DepartmentName pulumi.StringInput
// The principal id of the user to whom the role was assigned.
PrincipalId pulumi.StringPtrInput
// The principal tenant id of the user to whom the role was assigned.
PrincipalTenantId pulumi.StringPtrInput
// The ID of the role definition.
RoleDefinitionId pulumi.StringPtrInput
// The authentication type of the user, whether Organization or MSA, of the user to whom the role was assigned. This is supported only for billing accounts with agreement type Enterprise Agreement.
UserAuthenticationType pulumi.StringPtrInput
// The email address of the user to whom the role was assigned. This is supported only for billing accounts with agreement type Enterprise Agreement.
UserEmailAddress pulumi.StringPtrInput
}
func (BillingRoleAssignmentByDepartmentArgs) ElementType() reflect.Type {
return reflect.TypeOf((*billingRoleAssignmentByDepartmentArgs)(nil)).Elem()
}
type BillingRoleAssignmentByDepartmentInput interface {
pulumi.Input
ToBillingRoleAssignmentByDepartmentOutput() BillingRoleAssignmentByDepartmentOutput
ToBillingRoleAssignmentByDepartmentOutputWithContext(ctx context.Context) BillingRoleAssignmentByDepartmentOutput
}
func (*BillingRoleAssignmentByDepartment) ElementType() reflect.Type {
return reflect.TypeOf((**BillingRoleAssignmentByDepartment)(nil)).Elem()
}
func (i *BillingRoleAssignmentByDepartment) ToBillingRoleAssignmentByDepartmentOutput() BillingRoleAssignmentByDepartmentOutput {
return i.ToBillingRoleAssignmentByDepartmentOutputWithContext(context.Background())
}
func (i *BillingRoleAssignmentByDepartment) ToBillingRoleAssignmentByDepartmentOutputWithContext(ctx context.Context) BillingRoleAssignmentByDepartmentOutput {
return pulumi.ToOutputWithContext(ctx, i).(BillingRoleAssignmentByDepartmentOutput)
}
type BillingRoleAssignmentByDepartmentOutput struct{ *pulumi.OutputState }
func (BillingRoleAssignmentByDepartmentOutput) ElementType() reflect.Type {
return reflect.TypeOf((**BillingRoleAssignmentByDepartment)(nil)).Elem()
}
func (o BillingRoleAssignmentByDepartmentOutput) ToBillingRoleAssignmentByDepartmentOutput() BillingRoleAssignmentByDepartmentOutput {
return o
}
func (o BillingRoleAssignmentByDepartmentOutput) ToBillingRoleAssignmentByDepartmentOutputWithContext(ctx context.Context) BillingRoleAssignmentByDepartmentOutput {
return o
}
// The principal Id of the user who created the role assignment.
func (o BillingRoleAssignmentByDepartmentOutput) CreatedByPrincipalId() pulumi.StringOutput {
return o.ApplyT(func(v *BillingRoleAssignmentByDepartment) pulumi.StringOutput { return v.CreatedByPrincipalId }).(pulumi.StringOutput)
}
// The tenant Id of the user who created the role assignment.
func (o BillingRoleAssignmentByDepartmentOutput) CreatedByPrincipalTenantId() pulumi.StringOutput {
return o.ApplyT(func(v *BillingRoleAssignmentByDepartment) pulumi.StringOutput { return v.CreatedByPrincipalTenantId }).(pulumi.StringOutput)
}
// The email address of the user who created the role assignment. This is supported only for billing accounts with agreement type Enterprise Agreement.
func (o BillingRoleAssignmentByDepartmentOutput) CreatedByUserEmailAddress() pulumi.StringOutput {
return o.ApplyT(func(v *BillingRoleAssignmentByDepartment) pulumi.StringOutput { return v.CreatedByUserEmailAddress }).(pulumi.StringOutput)
}
// The date the role assignment was created.
func (o BillingRoleAssignmentByDepartmentOutput) CreatedOn() pulumi.StringOutput {
return o.ApplyT(func(v *BillingRoleAssignmentByDepartment) pulumi.StringOutput { return v.CreatedOn }).(pulumi.StringOutput)
}
// Resource name.
func (o BillingRoleAssignmentByDepartmentOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *BillingRoleAssignmentByDepartment) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The principal id of the user to whom the role was assigned.
func (o BillingRoleAssignmentByDepartmentOutput) PrincipalId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *BillingRoleAssignmentByDepartment) pulumi.StringPtrOutput { return v.PrincipalId }).(pulumi.StringPtrOutput)
}
// The principal tenant id of the user to whom the role was assigned.
func (o BillingRoleAssignmentByDepartmentOutput) PrincipalTenantId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *BillingRoleAssignmentByDepartment) pulumi.StringPtrOutput { return v.PrincipalTenantId }).(pulumi.StringPtrOutput)
}
// The ID of the role definition.
func (o BillingRoleAssignmentByDepartmentOutput) RoleDefinitionId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *BillingRoleAssignmentByDepartment) pulumi.StringPtrOutput { return v.RoleDefinitionId }).(pulumi.StringPtrOutput)
}
// The scope at which the role was assigned.
func (o BillingRoleAssignmentByDepartmentOutput) Scope() pulumi.StringOutput {
return o.ApplyT(func(v *BillingRoleAssignmentByDepartment) pulumi.StringOutput { return v.Scope }).(pulumi.StringOutput)
}
// Resource type.
func (o BillingRoleAssignmentByDepartmentOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v *BillingRoleAssignmentByDepartment) pulumi.StringOutput { return v.Type }).(pulumi.StringOutput)
}
// The authentication type of the user, whether Organization or MSA, of the user to whom the role was assigned. This is supported only for billing accounts with agreement type Enterprise Agreement.
func (o BillingRoleAssignmentByDepartmentOutput) UserAuthenticationType() pulumi.StringPtrOutput {
return o.ApplyT(func(v *BillingRoleAssignmentByDepartment) pulumi.StringPtrOutput { return v.UserAuthenticationType }).(pulumi.StringPtrOutput)
}
// The email address of the user to whom the role was assigned. This is supported only for billing accounts with agreement type Enterprise Agreement.
func (o BillingRoleAssignmentByDepartmentOutput) UserEmailAddress() pulumi.StringPtrOutput {
return o.ApplyT(func(v *BillingRoleAssignmentByDepartment) pulumi.StringPtrOutput { return v.UserEmailAddress }).(pulumi.StringPtrOutput)
}
func init() {
pulumi.RegisterOutputType(BillingRoleAssignmentByDepartmentOutput{})
}