Skip to content

Commit a8a6430

Browse files
fix(authorizationmanagement): updates to the authorizationmanagement package (#1353)
1 parent ef9a5c3 commit a8a6430

3 files changed

Lines changed: 116 additions & 6 deletions

File tree

.tutone.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,8 @@ packages:
167167
- name: DateTime
168168
field_type_override: nrtime.DateTime
169169
skip_type_create: true
170+
- name: AuthorizationManagementGrantee
171+
field_type_override: "*AuthorizationManagementGrantee"
170172

171173
- name: alerts
172174
path: pkg/alerts

pkg/authorizationmanagement/authorizationmanagement_api.go

Lines changed: 10 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/authorizationmanagement/types.go

Lines changed: 104 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,96 @@
11
// Code generated by tutone: DO NOT EDIT
22
package authorizationmanagement
33

4+
// AuthorizationManagementGranteeTypeEnum - Defines the grantee types for authorization management
5+
type AuthorizationManagementGranteeTypeEnum string
6+
7+
var AuthorizationManagementGranteeTypeEnumTypes = struct {
8+
// Group grantee type
9+
GROUP AuthorizationManagementGranteeTypeEnum
10+
// Organization grantee type
11+
ORGANIZATION AuthorizationManagementGranteeTypeEnum
12+
// System identity grantee type
13+
SYSTEM_IDENTITY AuthorizationManagementGranteeTypeEnum
14+
// System identity group grantee type
15+
SYSTEM_IDENTITY_GROUP AuthorizationManagementGranteeTypeEnum
16+
// User grantee type
17+
USER AuthorizationManagementGranteeTypeEnum
18+
}{
19+
// Group grantee type
20+
GROUP: "GROUP",
21+
// Organization grantee type
22+
ORGANIZATION: "ORGANIZATION",
23+
// System identity grantee type
24+
SYSTEM_IDENTITY: "SYSTEM_IDENTITY",
25+
// System identity group grantee type
26+
SYSTEM_IDENTITY_GROUP: "SYSTEM_IDENTITY_GROUP",
27+
// User grantee type
28+
USER: "USER",
29+
}
30+
31+
// AuthorizationManagementIamParentScopeTypeEnum - Defines the iam parent scope type for grant/revoke mutation
32+
type AuthorizationManagementIamParentScopeTypeEnum string
33+
34+
var AuthorizationManagementIamParentScopeTypeEnumTypes = struct {
35+
// Account iam parent scope
36+
ACCOUNT AuthorizationManagementIamParentScopeTypeEnum
37+
// Organization iam parent scope
38+
ORGANIZATION AuthorizationManagementIamParentScopeTypeEnum
39+
}{
40+
// Account iam parent scope
41+
ACCOUNT: "ACCOUNT",
42+
// Organization iam parent scope
43+
ORGANIZATION: "ORGANIZATION",
44+
}
45+
446
// Actor - The `Actor` object contains fields that are scoped to the API user's access level.
547
type Actor struct {
648
// The `organization` field is the entry point into data that is scoped to the user's organization.
749
Organization Organization `json:"organization,omitempty"`
850
}
951

52+
// AuthorizationManagementAccessGrant - An Access Grant defines the access a group has to an entity
53+
type AuthorizationManagementAccessGrant struct {
54+
// a value that uniquely identifies this object
55+
ID string `json:"id"`
56+
}
57+
1058
// AuthorizationManagementAccountAccessGrant - The Account and Role a Group should have access to
1159
type AuthorizationManagementAccountAccessGrant struct {
1260
// The Account ID the Role will grant access to
1361
AccountID int `json:"accountId"`
62+
// The Data Access Policy ID will define what data in an account is allowed
63+
DataAccessPolicyId string `json:"dataAccessPolicyId,omitempty"`
1464
// The Role ID that will define the access
1565
RoleId string `json:"roleId"`
1666
}
1767

68+
// AuthorizationManagementEntity - The Entity a Group should have access to
69+
type AuthorizationManagementEntity struct {
70+
// The Entity id that will define the Entity's access
71+
ID string `json:"id"`
72+
// The Entity type that defines the scope (organization, account, or group)
73+
Type string `json:"type"`
74+
}
75+
76+
// AuthorizationManagementEntityAccessGrants - The Entity and Role a Group should have access to
77+
type AuthorizationManagementEntityAccessGrants struct {
78+
// The Entity type that defines the scope (organization, account, or group)
79+
Entity AuthorizationManagementEntity `json:"entity,omitempty"`
80+
// The IAM Parent entity with the given scope and entity id (organization or account)
81+
IamParent AuthorizationManagementIamParent `json:"iamParent,omitempty"`
82+
// The Role ID that will define the Entity's access
83+
RoleId string `json:"roleId"`
84+
}
85+
1886
// AuthorizationManagementGrantAccess - The input object representing the access to grant for the group
1987
type AuthorizationManagementGrantAccess struct {
20-
// The Role and the Account the Target Group should have access to
88+
// The Role, Data Access Policy, and the Account that the Target Group should have access to
2189
AccountAccessGrants []AuthorizationManagementAccountAccessGrant `json:"accountAccessGrants,omitempty"`
90+
// The Entity and Role a Group should have access to
91+
EntityAccessGrants []AuthorizationManagementEntityAccessGrants `json:"entityAccessGrants,omitempty"`
92+
// The Grantee to which the access will be granted
93+
Grantee *AuthorizationManagementGrantee `json:"grantee,omitempty"`
2294
// The Role and the Group the Target Group should have access to
2395
GroupAccessGrants []AuthorizationManagementGroupAccessGrant `json:"groupAccessGrants,omitempty"`
2496
// The Group ID that will have access granted
@@ -27,8 +99,10 @@ type AuthorizationManagementGrantAccess struct {
2799
OrganizationAccessGrants []AuthorizationManagementOrganizationAccessGrant `json:"organizationAccessGrants,omitempty"`
28100
}
29101

30-
// AuthorizationManagementGrantAccessPayload - Autogenerated return type of GrantAccess
102+
// AuthorizationManagementGrantAccessPayload - Autogenerated return type of GrantAccess.
31103
type AuthorizationManagementGrantAccessPayload struct {
104+
// the access grants that were created
105+
AccessGrants []AuthorizationManagementAccessGrant `json:"accessGrants"`
32106
// the roles that were granted to this group
33107
Roles []AuthorizationManagementGrantedRole `json:"roles"`
34108
}
@@ -37,6 +111,8 @@ type AuthorizationManagementGrantAccessPayload struct {
37111
type AuthorizationManagementGrantedRole struct {
38112
// the account that this role grants access to
39113
AccountID int `json:"accountId,omitempty"`
114+
// the data access policy that defines the data access
115+
DataAccessPolicyId string `json:"dataAccessPolicyId,omitempty"`
40116
// the name of the object
41117
DisplayName string `json:"displayName,omitempty"`
42118
// the group that this role grants access to
@@ -63,6 +139,14 @@ type AuthorizationManagementGrantedRoleSearch struct {
63139
TotalCount int `json:"totalCount"`
64140
}
65141

142+
// AuthorizationManagementGrantee - The actor or group that are the recipient of the access grant
143+
type AuthorizationManagementGrantee struct {
144+
// The ID of the object that is having access modified
145+
ID string `json:"id"`
146+
// The type of the object that is having access modified. Valid values are: group, user, system_identity, system_identity_group, organization
147+
Type AuthorizationManagementGranteeTypeEnum `json:"type"`
148+
}
149+
66150
// AuthorizationManagementGroupAccessGrant - The Group and Role another Group should have access to
67151
type AuthorizationManagementGroupAccessGrant struct {
68152
// The Group ID the Role will grant access to
@@ -71,6 +155,14 @@ type AuthorizationManagementGroupAccessGrant struct {
71155
RoleId string `json:"roleId"`
72156
}
73157

158+
// AuthorizationManagementIamParent - The IAM Parent entity with the given scope and entity id (organization or account)
159+
type AuthorizationManagementIamParent struct {
160+
// The id of the entity at parent scope
161+
ID string `json:"id"`
162+
// The parent IAM scope (account or organization)
163+
Scope AuthorizationManagementIamParentScopeTypeEnum `json:"scope"`
164+
}
165+
74166
// AuthorizationManagementOrganizationAccessGrant - The Organization Role a Group should have access to
75167
type AuthorizationManagementOrganizationAccessGrant struct {
76168
// The Role ID that will define the Organization access
@@ -84,8 +176,12 @@ type AuthorizationManagementOrganizationStitchedFields struct {
84176

85177
// AuthorizationManagementRevokeAccess - The input object representing the access to revoke for the group
86178
type AuthorizationManagementRevokeAccess struct {
87-
// The Role and the Account the Target Group should no longer have access to
179+
// The Role, Data Access Policy, and the Account that the Target Group should no longer have access to
88180
AccountAccessGrants []AuthorizationManagementAccountAccessGrant `json:"accountAccessGrants,omitempty"`
181+
// The Entity and Role a Group should no longer have access to
182+
EntityAccessGrants []AuthorizationManagementEntityAccessGrants `json:"entityAccessGrants,omitempty"`
183+
// The Grantee to which the access will be granted
184+
Grantee *AuthorizationManagementGrantee `json:"grantee,omitempty"`
89185
// The Role and the Group the Target Group should no longer have access to
90186
GroupAccessGrants []AuthorizationManagementGroupAccessGrant `json:"groupAccessGrants,omitempty"`
91187
// The Group ID that will have access revoked
@@ -94,8 +190,10 @@ type AuthorizationManagementRevokeAccess struct {
94190
OrganizationAccessGrants []AuthorizationManagementOrganizationAccessGrant `json:"organizationAccessGrants,omitempty"`
95191
}
96192

97-
// AuthorizationManagementRevokeAccessPayload - Autogenerated return type of RevokeAccess
193+
// AuthorizationManagementRevokeAccessPayload - Autogenerated return type of RevokeAccess.
98194
type AuthorizationManagementRevokeAccessPayload struct {
195+
// the access grants that were revoked
196+
AccessGrants []AuthorizationManagementAccessGrant `json:"accessGrants"`
99197
// the roles that were revoked from this group
100198
Roles []AuthorizationManagementGrantedRole `json:"roles"`
101199
}
@@ -154,6 +252,8 @@ type Organization struct {
154252
CustomerId string `json:"customerId,omitempty"`
155253
// The name of the organization.
156254
Name string `json:"name,omitempty"`
255+
// The storage account of the organization
256+
StorageAccountId int `json:"storageAccountId,omitempty"`
157257
// The telemetry id for the organization
158258
TelemetryId string `json:"telemetryId,omitempty"`
159259
}

0 commit comments

Comments
 (0)