-
Notifications
You must be signed in to change notification settings - Fork 17
/
awsiam_IRole.go
105 lines (89 loc) · 1.89 KB
/
awsiam_IRole.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
package awsiam
import (
_jsii_ "github.com/aws/jsii-runtime-go/runtime"
)
// A Role object.
// Experimental.
type IRole interface {
IIdentity
// Grant the actions defined in actions to the identity Principal on this resource.
// Experimental.
Grant(grantee IPrincipal, actions ...*string) Grant
// Grant permissions to the given principal to assume this role.
// Experimental.
GrantAssumeRole(grantee IPrincipal) Grant
// Grant permissions to the given principal to pass this role.
// Experimental.
GrantPassRole(grantee IPrincipal) Grant
// Returns the ARN of this role.
// Experimental.
RoleArn() *string
// Returns the name of this role.
// Experimental.
RoleName() *string
}
// The jsii proxy for IRole
type jsiiProxy_IRole struct {
jsiiProxy_IIdentity
}
func (i *jsiiProxy_IRole) Grant(grantee IPrincipal, actions ...*string) Grant {
if err := i.validateGrantParameters(grantee); err != nil {
panic(err)
}
args := []interface{}{grantee}
for _, a := range actions {
args = append(args, a)
}
var returns Grant
_jsii_.Invoke(
i,
"grant",
args,
&returns,
)
return returns
}
func (i *jsiiProxy_IRole) GrantAssumeRole(grantee IPrincipal) Grant {
if err := i.validateGrantAssumeRoleParameters(grantee); err != nil {
panic(err)
}
var returns Grant
_jsii_.Invoke(
i,
"grantAssumeRole",
[]interface{}{grantee},
&returns,
)
return returns
}
func (i *jsiiProxy_IRole) GrantPassRole(grantee IPrincipal) Grant {
if err := i.validateGrantPassRoleParameters(grantee); err != nil {
panic(err)
}
var returns Grant
_jsii_.Invoke(
i,
"grantPassRole",
[]interface{}{grantee},
&returns,
)
return returns
}
func (j *jsiiProxy_IRole) RoleArn() *string {
var returns *string
_jsii_.Get(
j,
"roleArn",
&returns,
)
return returns
}
func (j *jsiiProxy_IRole) RoleName() *string {
var returns *string
_jsii_.Get(
j,
"roleName",
&returns,
)
return returns
}