forked from pulumi/pulumi-azure-native-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
getBillingRoleAssignmentByDepartment.go
173 lines (146 loc) · 8.85 KB
/
getBillingRoleAssignmentByDepartment.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
// 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"
"github.com/pulumi/pulumi-azure-native-sdk/v2/utilities"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Gets a role assignment for the caller on a department. The operation is supported only for billing accounts with agreement type Enterprise Agreement.
// Azure REST API version: 2019-10-01-preview.
func LookupBillingRoleAssignmentByDepartment(ctx *pulumi.Context, args *LookupBillingRoleAssignmentByDepartmentArgs, opts ...pulumi.InvokeOption) (*LookupBillingRoleAssignmentByDepartmentResult, error) {
opts = utilities.PkgInvokeDefaultOpts(opts)
var rv LookupBillingRoleAssignmentByDepartmentResult
err := ctx.Invoke("azure-native:billing:getBillingRoleAssignmentByDepartment", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
type LookupBillingRoleAssignmentByDepartmentArgs 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 role assignment
type LookupBillingRoleAssignmentByDepartmentResult struct {
// The principal Id of the user who created the role assignment.
CreatedByPrincipalId string `pulumi:"createdByPrincipalId"`
// The tenant Id of the user who created the role assignment.
CreatedByPrincipalTenantId string `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 string `pulumi:"createdByUserEmailAddress"`
// The date the role assignment was created.
CreatedOn string `pulumi:"createdOn"`
// Resource Id.
Id string `pulumi:"id"`
// Resource name.
Name string `pulumi:"name"`
// 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 scope at which the role was assigned.
Scope string `pulumi:"scope"`
// Resource type.
Type string `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 *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"`
}
func LookupBillingRoleAssignmentByDepartmentOutput(ctx *pulumi.Context, args LookupBillingRoleAssignmentByDepartmentOutputArgs, opts ...pulumi.InvokeOption) LookupBillingRoleAssignmentByDepartmentResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (LookupBillingRoleAssignmentByDepartmentResult, error) {
args := v.(LookupBillingRoleAssignmentByDepartmentArgs)
r, err := LookupBillingRoleAssignmentByDepartment(ctx, &args, opts...)
var s LookupBillingRoleAssignmentByDepartmentResult
if r != nil {
s = *r
}
return s, err
}).(LookupBillingRoleAssignmentByDepartmentResultOutput)
}
type LookupBillingRoleAssignmentByDepartmentOutputArgs struct {
// The ID that uniquely identifies a billing account.
BillingAccountName pulumi.StringInput `pulumi:"billingAccountName"`
// The ID that uniquely identifies a role assignment.
BillingRoleAssignmentName pulumi.StringInput `pulumi:"billingRoleAssignmentName"`
// The ID that uniquely identifies a department.
DepartmentName pulumi.StringInput `pulumi:"departmentName"`
}
func (LookupBillingRoleAssignmentByDepartmentOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupBillingRoleAssignmentByDepartmentArgs)(nil)).Elem()
}
// The role assignment
type LookupBillingRoleAssignmentByDepartmentResultOutput struct{ *pulumi.OutputState }
func (LookupBillingRoleAssignmentByDepartmentResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupBillingRoleAssignmentByDepartmentResult)(nil)).Elem()
}
func (o LookupBillingRoleAssignmentByDepartmentResultOutput) ToLookupBillingRoleAssignmentByDepartmentResultOutput() LookupBillingRoleAssignmentByDepartmentResultOutput {
return o
}
func (o LookupBillingRoleAssignmentByDepartmentResultOutput) ToLookupBillingRoleAssignmentByDepartmentResultOutputWithContext(ctx context.Context) LookupBillingRoleAssignmentByDepartmentResultOutput {
return o
}
// The principal Id of the user who created the role assignment.
func (o LookupBillingRoleAssignmentByDepartmentResultOutput) CreatedByPrincipalId() pulumi.StringOutput {
return o.ApplyT(func(v LookupBillingRoleAssignmentByDepartmentResult) string { return v.CreatedByPrincipalId }).(pulumi.StringOutput)
}
// The tenant Id of the user who created the role assignment.
func (o LookupBillingRoleAssignmentByDepartmentResultOutput) CreatedByPrincipalTenantId() pulumi.StringOutput {
return o.ApplyT(func(v LookupBillingRoleAssignmentByDepartmentResult) string { 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 LookupBillingRoleAssignmentByDepartmentResultOutput) CreatedByUserEmailAddress() pulumi.StringOutput {
return o.ApplyT(func(v LookupBillingRoleAssignmentByDepartmentResult) string { return v.CreatedByUserEmailAddress }).(pulumi.StringOutput)
}
// The date the role assignment was created.
func (o LookupBillingRoleAssignmentByDepartmentResultOutput) CreatedOn() pulumi.StringOutput {
return o.ApplyT(func(v LookupBillingRoleAssignmentByDepartmentResult) string { return v.CreatedOn }).(pulumi.StringOutput)
}
// Resource Id.
func (o LookupBillingRoleAssignmentByDepartmentResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupBillingRoleAssignmentByDepartmentResult) string { return v.Id }).(pulumi.StringOutput)
}
// Resource name.
func (o LookupBillingRoleAssignmentByDepartmentResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupBillingRoleAssignmentByDepartmentResult) string { return v.Name }).(pulumi.StringOutput)
}
// The principal id of the user to whom the role was assigned.
func (o LookupBillingRoleAssignmentByDepartmentResultOutput) PrincipalId() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupBillingRoleAssignmentByDepartmentResult) *string { return v.PrincipalId }).(pulumi.StringPtrOutput)
}
// The principal tenant id of the user to whom the role was assigned.
func (o LookupBillingRoleAssignmentByDepartmentResultOutput) PrincipalTenantId() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupBillingRoleAssignmentByDepartmentResult) *string { return v.PrincipalTenantId }).(pulumi.StringPtrOutput)
}
// The ID of the role definition.
func (o LookupBillingRoleAssignmentByDepartmentResultOutput) RoleDefinitionId() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupBillingRoleAssignmentByDepartmentResult) *string { return v.RoleDefinitionId }).(pulumi.StringPtrOutput)
}
// The scope at which the role was assigned.
func (o LookupBillingRoleAssignmentByDepartmentResultOutput) Scope() pulumi.StringOutput {
return o.ApplyT(func(v LookupBillingRoleAssignmentByDepartmentResult) string { return v.Scope }).(pulumi.StringOutput)
}
// Resource type.
func (o LookupBillingRoleAssignmentByDepartmentResultOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v LookupBillingRoleAssignmentByDepartmentResult) string { 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 LookupBillingRoleAssignmentByDepartmentResultOutput) UserAuthenticationType() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupBillingRoleAssignmentByDepartmentResult) *string { 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 LookupBillingRoleAssignmentByDepartmentResultOutput) UserEmailAddress() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupBillingRoleAssignmentByDepartmentResult) *string { return v.UserEmailAddress }).(pulumi.StringPtrOutput)
}
func init() {
pulumi.RegisterOutputType(LookupBillingRoleAssignmentByDepartmentResultOutput{})
}