Skip to content

Commit 44b9638

Browse files
committed
Regenerate Python SDK against latest OpenAPI specification
1 parent 87231fa commit 44b9638

24 files changed

+1309
-97
lines changed

.openapi-generator/FILES

Lines changed: 9 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
README.md
66
docs/Access.md
77
docs/AccessList.md
8-
docs/AccessRuleCondition.md
8+
docs/AccessRule.md
99
docs/AccessRulesApi.md
1010
docs/AddBundleGroupRequest.md
1111
docs/AddBundleResourceRequest.md
@@ -67,6 +67,7 @@ docs/GroupRemoteInfoGitlabGroup.md
6767
docs/GroupRemoteInfoGoogleGroup.md
6868
docs/GroupRemoteInfoLdapGroup.md
6969
docs/GroupRemoteInfoOktaGroup.md
70+
docs/GroupRemoteInfoSnowflakeRole.md
7071
docs/GroupResource.md
7172
docs/GroupResourceList.md
7273
docs/GroupTypeEnum.md
@@ -175,6 +176,7 @@ docs/UAR.md
175176
docs/UARReviewerAssignmentPolicyEnum.md
176177
docs/UARScope.md
177178
docs/UarsApi.md
179+
docs/UpdateAccessRuleInfo.md
178180
docs/UpdateConfigurationTemplateInfo.md
179181
docs/UpdateGroupBindingInfo.md
180182
docs/UpdateGroupBindingInfoList.md
@@ -223,7 +225,7 @@ opal_security/exceptions.py
223225
opal_security/models/__init__.py
224226
opal_security/models/access.py
225227
opal_security/models/access_list.py
226-
opal_security/models/access_rule_condition.py
228+
opal_security/models/access_rule.py
227229
opal_security/models/add_bundle_group_request.py
228230
opal_security/models/add_bundle_resource_request.py
229231
opal_security/models/add_group_resource_request.py
@@ -279,6 +281,7 @@ opal_security/models/group_remote_info_gitlab_group.py
279281
opal_security/models/group_remote_info_google_group.py
280282
opal_security/models/group_remote_info_ldap_group.py
281283
opal_security/models/group_remote_info_okta_group.py
284+
opal_security/models/group_remote_info_snowflake_role.py
282285
opal_security/models/group_resource.py
283286
opal_security/models/group_resource_list.py
284287
opal_security/models/group_type_enum.py
@@ -376,6 +379,7 @@ opal_security/models/ticketing_provider_enum.py
376379
opal_security/models/uar.py
377380
opal_security/models/uar_reviewer_assignment_policy_enum.py
378381
opal_security/models/uar_scope.py
382+
opal_security/models/update_access_rule_info.py
379383
opal_security/models/update_configuration_template_info.py
380384
opal_security/models/update_group_binding_info.py
381385
opal_security/models/update_group_binding_info_list.py
@@ -403,24 +407,7 @@ setup.cfg
403407
setup.py
404408
test-requirements.txt
405409
test/__init__.py
406-
test/test_access_rule_condition.py
407-
test/test_access_rules_api.py
408-
test/test_add_bundle_group_request.py
409-
test/test_add_bundle_resource_request.py
410-
test/test_bundle.py
411-
test/test_bundle_group.py
412-
test/test_bundle_resource.py
413-
test/test_bundles_api.py
414-
test/test_create_bundle_info.py
415-
test/test_group_containing_group.py
416-
test/test_group_containing_group_list.py
417-
test/test_group_with_access_level.py
418-
test/test_paginated_bundle_group_list.py
419-
test/test_paginated_bundle_list.py
420-
test/test_paginated_bundle_resource_list.py
421-
test/test_rule_clauses.py
422-
test/test_rule_conjunction.py
423-
test/test_rule_disjunction.py
424-
test/test_tag_selector.py
425-
test/test_update_resource_user_request.py
410+
test/test_access_rule.py
411+
test/test_group_remote_info_snowflake_role.py
412+
test/test_update_access_rule_info.py
426413
tox.ini

README.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,14 +82,14 @@ configuration = opal.Configuration(
8282
with opal.ApiClient(configuration) as api_client:
8383
# Create an instance of the API class
8484
api_instance = opal.AccessRulesApi(api_client)
85-
access_rule_id = '1b978423-db0a-4037-a4cf-f79c60cb67b3' # str | The access rule ID (group ID) of the access rule.
85+
update_access_rule_info = opal_security.UpdateAccessRuleInfo() # UpdateAccessRuleInfo |
8686

8787
try:
88-
api_response = api_instance.get_access_rule(access_rule_id)
89-
print("The response of AccessRulesApi->get_access_rule:\n")
88+
api_response = api_instance.create_access_rule(update_access_rule_info)
89+
print("The response of AccessRulesApi->create_access_rule:\n")
9090
pprint(api_response)
9191
except ApiException as e:
92-
print("Exception when calling AccessRulesApi->get_access_rule: %s\n" % e)
92+
print("Exception when calling AccessRulesApi->create_access_rule: %s\n" % e)
9393

9494
```
9595

@@ -141,6 +141,7 @@ All URIs are relative to *https://api.opal.dev/v1*
141141

142142
Class | Method | HTTP request | Description
143143
------------ | ------------- | ------------- | -------------
144+
*AccessRulesApi* | [**create_access_rule**](docs/AccessRulesApi.md#create_access_rule) | **POST** /access-rules |
144145
*AccessRulesApi* | [**get_access_rule**](docs/AccessRulesApi.md#get_access_rule) | **GET** /access-rules/{access_rule_id} |
145146
*AccessRulesApi* | [**update_access_rule**](docs/AccessRulesApi.md#update_access_rule) | **PUT** /access-rules/{access_rule_id} |
146147
*AppsApi* | [**get_app**](docs/AppsApi.md#get_app) | **GET** /apps/{app_id} |
@@ -261,7 +262,7 @@ Class | Method | HTTP request | Description
261262

262263
- [Access](docs/Access.md)
263264
- [AccessList](docs/AccessList.md)
264-
- [AccessRuleCondition](docs/AccessRuleCondition.md)
265+
- [AccessRule](docs/AccessRule.md)
265266
- [AddBundleGroupRequest](docs/AddBundleGroupRequest.md)
266267
- [AddBundleResourceRequest](docs/AddBundleResourceRequest.md)
267268
- [AddGroupResourceRequest](docs/AddGroupResourceRequest.md)
@@ -317,6 +318,7 @@ Class | Method | HTTP request | Description
317318
- [GroupRemoteInfoGoogleGroup](docs/GroupRemoteInfoGoogleGroup.md)
318319
- [GroupRemoteInfoLdapGroup](docs/GroupRemoteInfoLdapGroup.md)
319320
- [GroupRemoteInfoOktaGroup](docs/GroupRemoteInfoOktaGroup.md)
321+
- [GroupRemoteInfoSnowflakeRole](docs/GroupRemoteInfoSnowflakeRole.md)
320322
- [GroupResource](docs/GroupResource.md)
321323
- [GroupResourceList](docs/GroupResourceList.md)
322324
- [GroupTypeEnum](docs/GroupTypeEnum.md)
@@ -414,6 +416,7 @@ Class | Method | HTTP request | Description
414416
- [UAR](docs/UAR.md)
415417
- [UARReviewerAssignmentPolicyEnum](docs/UARReviewerAssignmentPolicyEnum.md)
416418
- [UARScope](docs/UARScope.md)
419+
- [UpdateAccessRuleInfo](docs/UpdateAccessRuleInfo.md)
417420
- [UpdateConfigurationTemplateInfo](docs/UpdateConfigurationTemplateInfo.md)
418421
- [UpdateGroupBindingInfo](docs/UpdateGroupBindingInfo.md)
419422
- [UpdateGroupBindingInfoList](docs/UpdateGroupBindingInfoList.md)

api/openapi.yaml

Lines changed: 132 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -589,8 +589,8 @@ paths:
589589
summary: Example with date
590590
value: 2021-11-01
591591
withDatetime:
592-
summary: Example with date and time
593-
value: 2021-11-01 12:00:00
592+
summary: Example with date and time in ISO 8601 datetime format.
593+
value: 2025-01-01T00:00:00Z
594594
explode: true
595595
in: query
596596
name: start_date_filter
@@ -604,8 +604,8 @@ paths:
604604
summary: Example with date
605605
value: 2021-11-12
606606
withDatetime:
607-
summary: Example with date and time
608-
value: 2021-11-12 12:00:00
607+
summary: Example with date and time in ISO 8601 datetime format.
608+
value: 2025-01-01T00:00:00Z
609609
explode: true
610610
in: query
611611
name: end_date_filter
@@ -1988,6 +1988,36 @@ paths:
19881988
description: Returns a list of requests for your organization that is visible by the admin.
19891989
operationId: getRequests
19901990
parameters:
1991+
- description: A start date filter for the events.
1992+
examples:
1993+
withDate:
1994+
summary: Example with date
1995+
value: 2021-11-01
1996+
withDatetime:
1997+
summary: Example with date and time in ISO 8601 datetime format.
1998+
value: 2025-01-01T00:00:00Z
1999+
explode: true
2000+
in: query
2001+
name: start_date_filter
2002+
required: false
2003+
schema:
2004+
type: string
2005+
style: form
2006+
- description: An end date filter for the events.
2007+
examples:
2008+
withDate:
2009+
summary: Example with date
2010+
value: 2021-11-12
2011+
withDatetime:
2012+
summary: Example with date and time in ISO 8601 datetime format.
2013+
value: 2025-01-01T00:00:00Z
2014+
explode: true
2015+
in: query
2016+
name: end_date_filter
2017+
required: false
2018+
schema:
2019+
type: string
2020+
style: form
19912021
- description: The pagination cursor value.
19922022
example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw
19932023
explode: true
@@ -2841,6 +2871,7 @@ paths:
28412871
- resources
28422872
/resource-user-access-status/{resource_id}/{user_id}:
28432873
get:
2874+
deprecated: true
28442875
description: Get user's access status to a resource.
28452876
operationId: resource_user_access_status_retrieve
28462877
parameters:
@@ -3060,6 +3091,27 @@ paths:
30603091
- BearerAuth: []
30613092
tags:
30623093
- users
3094+
/access-rules:
3095+
post:
3096+
description: Creates a new access rule config for the given group_id.
3097+
operationId: create_access_rule
3098+
requestBody:
3099+
required: true
3100+
content:
3101+
application/json:
3102+
schema:
3103+
$ref: "#/components/schemas/UpdateAccessRuleInfo"
3104+
responses:
3105+
"201":
3106+
content:
3107+
application/json:
3108+
schema:
3109+
$ref: "#/components/schemas/AccessRule"
3110+
description: The created access rule config for the group.
3111+
security:
3112+
- BearerAuth: []
3113+
tags:
3114+
- access-rules
30633115
/access-rules/{access_rule_id}:
30643116
get:
30653117
description: Returns a list of access rule config given the group_id of the access rule.
@@ -3080,7 +3132,7 @@ paths:
30803132
content:
30813133
application/json:
30823134
schema:
3083-
$ref: "#/components/schemas/AccessRuleCondition"
3135+
$ref: "#/components/schemas/AccessRule"
30843136
description: The access rules for the group.
30853137
security:
30863138
- BearerAuth: []
@@ -3105,13 +3157,13 @@ paths:
31053157
content:
31063158
application/json:
31073159
schema:
3108-
$ref: "#/components/schemas/AccessRuleCondition"
3160+
$ref: "#/components/schemas/UpdateAccessRuleInfo"
31093161
responses:
31103162
"200":
31113163
content:
31123164
application/json:
31133165
schema:
3114-
$ref: "#/components/schemas/AccessRuleCondition"
3166+
$ref: "#/components/schemas/AccessRule"
31153167
description: The updated access rule config for the group.
31163168
security:
31173169
- BearerAuth: []
@@ -5930,6 +5982,16 @@ components:
59305982
type: object
59315983
required:
59325984
- group_id
5985+
snowflake_role:
5986+
description: Remote info for Snowflake role.
5987+
properties:
5988+
role_id:
5989+
description: The id of the Snowflake role.
5990+
example: 01fa7402-01d8-103b-8deb-5f3a0ab7884
5991+
type: string
5992+
type: object
5993+
required:
5994+
- role_id
59335995
type: object
59345996
ResourceRemoteInfo:
59355997
description: Information that defines the remote resource. This replaces the deprecated remote_id and metadata fields.
@@ -6803,10 +6865,10 @@ components:
68036865
### Usage Example
68046866
Returned from the `GET Requests` endpoint.
68056867
enum:
6806-
- pending
6807-
- approved
6808-
- denied
6809-
- canceled
6868+
- PENDING
6869+
- APPROVED
6870+
- DENIED
6871+
- CANCELED
68106872
type: string
68116873
Request:
68126874
description: |-
@@ -7679,15 +7741,67 @@ components:
76797741
- group_id
76807742
- group_type
76817743
type: object
7682-
AccessRuleCondition:
7744+
UpdateAccessRuleInfo:
7745+
description: |-
7746+
# UpdateAccessRuleInfo Object
7747+
### Description
7748+
The `UpdateAccessRuleInfo` object is used as an input to the UpdateAccessRule and CreateAccessRule API.
7749+
properties:
7750+
name:
7751+
description: The name of the access rule.
7752+
example: Platform Engineering
7753+
type: string
7754+
description:
7755+
description: A description of the group.
7756+
example: This access rule represents all platform engineers in the company.
7757+
type: string
7758+
admin_owner_id:
7759+
description: The ID of the owner of the group.
7760+
example: 7c86c85d-0651-43e2-a748-d69d658418e8
7761+
format: uuid
7762+
type: string
7763+
status:
7764+
description: The status of the access rule.
7765+
type: string
7766+
enum:
7767+
- ACTIVE
7768+
- PAUSED
7769+
example: ACTIVE
7770+
ruleClauses:
7771+
$ref: "#/components/schemas/RuleClauses"
7772+
required:
7773+
- status
7774+
- ruleClauses
7775+
- name
7776+
- admin_owner_id
7777+
- description
7778+
AccessRule:
76837779
description: |-
7684-
# Access Rule Config Object
7780+
# Access Rule Object
76857781
### Description
7686-
The `AccessRuleConfig` object is used to represent an access rule configuration.
7782+
The `AccessRule` object is used to represent an access rule configuration.
76877783
76887784
### Usage Example
76897785
Get access rule configurations from the `GET Access Rule Configs` endpoint.
76907786
properties:
7787+
access_rule_id:
7788+
description: The ID (group ID) of the access rule.
7789+
example: 7c86c85d-0651-43e2-a748-d69d658418e8
7790+
format: uuid
7791+
type: string
7792+
name:
7793+
description: The name of the access rule.
7794+
example: Platform Engineering
7795+
type: string
7796+
description:
7797+
description: A description of the group.
7798+
example: This access rule represents all platform engineers in the company.
7799+
type: string
7800+
admin_owner_id:
7801+
description: The ID of the owner of the group.
7802+
example: 7c86c85d-0651-43e2-a748-d69d658418e8
7803+
format: uuid
7804+
type: string
76917805
status:
76927806
description: The status of the access rule.
76937807
type: string
@@ -7700,6 +7814,10 @@ components:
77007814
required:
77017815
- status
77027816
- ruleClauses
7817+
- name
7818+
- admin_owner_id
7819+
- access_rule_id
7820+
- description
77037821
RuleClauses:
77047822
properties:
77057823
when:
@@ -7721,7 +7839,6 @@ components:
77217839
properties:
77227840
selectors:
77237841
type: array
7724-
minItems: 1
77257842
items:
77267843
$ref: "#/components/schemas/TagSelector"
77277844
required:

0 commit comments

Comments
 (0)