Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Excavator: Upgrade API Version #96

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -830,6 +830,7 @@ Namespace | Resource | Operation | HTTP request |
- [PrincipalType](docs/v2/models/PrincipalType.md)
- [Realm](docs/v2/models/Realm.md)
- [ReleaseStatus](docs/v2/models/ReleaseStatus.md)
- [RoleId](docs/v2/models/RoleId.md)
- [ShortType](docs/v2/models/ShortType.md)
- [ShortTypeDict](docs/v2/models/ShortTypeDict.md)
- [SizeBytes](docs/v2/models/SizeBytes.md)
Expand Down Expand Up @@ -877,6 +878,8 @@ Namespace | Resource | Operation | HTTP request |
- [TransactionType](docs/v2/models/TransactionType.md)
- [AccessRequirements](docs/v2/models/AccessRequirements.md)
- [AccessRequirementsDict](docs/v2/models/AccessRequirementsDict.md)
- [Everyone](docs/v2/models/Everyone.md)
- [EveryoneDict](docs/v2/models/EveryoneDict.md)
- [Folder](docs/v2/models/Folder.md)
- [FolderDict](docs/v2/models/FolderDict.md)
- [FolderRid](docs/v2/models/FolderRid.md)
Expand All @@ -888,10 +891,14 @@ Namespace | Resource | Operation | HTTP request |
- [ListMarkingsOfResourceResponseDict](docs/v2/models/ListMarkingsOfResourceResponseDict.md)
- [ListOrganizationsOfProjectResponse](docs/v2/models/ListOrganizationsOfProjectResponse.md)
- [ListOrganizationsOfProjectResponseDict](docs/v2/models/ListOrganizationsOfProjectResponseDict.md)
- [ListResourceRolesResponse](docs/v2/models/ListResourceRolesResponse.md)
- [ListResourceRolesResponseDict](docs/v2/models/ListResourceRolesResponseDict.md)
- [Marking](docs/v2/models/Marking.md)
- [MarkingDict](docs/v2/models/MarkingDict.md)
- [Organization](docs/v2/models/Organization.md)
- [OrganizationDict](docs/v2/models/OrganizationDict.md)
- [PrincipalWithId](docs/v2/models/PrincipalWithId.md)
- [PrincipalWithIdDict](docs/v2/models/PrincipalWithIdDict.md)
- [Project](docs/v2/models/Project.md)
- [ProjectDict](docs/v2/models/ProjectDict.md)
- [ProjectRid](docs/v2/models/ProjectRid.md)
Expand All @@ -900,6 +907,10 @@ Namespace | Resource | Operation | HTTP request |
- [ResourceDisplayName](docs/v2/models/ResourceDisplayName.md)
- [ResourcePath](docs/v2/models/ResourcePath.md)
- [ResourceRid](docs/v2/models/ResourceRid.md)
- [ResourceRole](docs/v2/models/ResourceRole.md)
- [ResourceRoleDict](docs/v2/models/ResourceRoleDict.md)
- [ResourceRolePrincipal](docs/v2/models/ResourceRolePrincipal.md)
- [ResourceRolePrincipalDict](docs/v2/models/ResourceRolePrincipalDict.md)
- [ResourceType](docs/v2/models/ResourceType.md)
- [SpaceRid](docs/v2/models/SpaceRid.md)
- [TrashStatus](docs/v2/models/TrashStatus.md)
Expand Down
254 changes: 254 additions & 0 deletions docs/v2/Filesystem/ResourceRole.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,254 @@
# ResourceRole

Method | HTTP request |
------------- | ------------- |



### Parameters

Name | Type | Description | Notes |
------------- | ------------- | ------------- | ------------- |
**resource_rid** | ResourceRid | resourceRid | |
**roles** | List[ResourceRoleDict] | | |
**preview** | Optional[PreviewMode] | preview | [optional] |

### Return type
**None**

### Example

```python
from foundry.v2 import FoundryClient
import foundry
from pprint import pprint

foundry_client = FoundryClient(
auth=foundry.UserTokenAuth(...), hostname="example.palantirfoundry.com"
)

# ResourceRid | resourceRid
resource_rid = "ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da"
# List[ResourceRoleDict] |
roles = [{"roleId": "8bf49052-dc37-4528-8bf0-b551cfb71268"}]
# Optional[PreviewMode] | preview
preview = None


try:
api_response = foundry_client.filesystem.Resource.ResourceRole.add(
resource_rid,
roles=roles,
preview=preview,
)
print("The add response:\n")
pprint(api_response)
except foundry.PalantirRPCException as e:
print("HTTP error when calling ResourceRole.add: %s\n" % e)

```



### Authorization

See [README](../../../README.md#authorization)

### HTTP response details
| Status Code | Type | Description | Content Type |
|-------------|-------------|-------------|------------------|
**204** | None | | None |

[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md)

List the roles on a resource.


### Parameters

Name | Type | Description | Notes |
------------- | ------------- | ------------- | ------------- |
**resource_rid** | ResourceRid | resourceRid | |
**include_inherited** | Optional[bool] | includeInherited | [optional] |
**page_size** | Optional[PageSize] | pageSize | [optional] |
**page_token** | Optional[PageToken] | pageToken | [optional] |
**preview** | Optional[PreviewMode] | preview | [optional] |

### Return type
**ResourceIterator[ResourceRole]**

### Example

```python
from foundry.v2 import FoundryClient
import foundry
from pprint import pprint

foundry_client = FoundryClient(
auth=foundry.UserTokenAuth(...), hostname="example.palantirfoundry.com"
)

# ResourceRid | resourceRid
resource_rid = "ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da"
# Optional[bool] | includeInherited
include_inherited = None
# Optional[PageSize] | pageSize
page_size = None
# Optional[PageToken] | pageToken
page_token = None
# Optional[PreviewMode] | preview
preview = None


try:
for resource_role in foundry_client.filesystem.Resource.ResourceRole.list(
resource_rid,
include_inherited=include_inherited,
page_size=page_size,
page_token=page_token,
preview=preview,
):
pprint(resource_role)
except foundry.PalantirRPCException as e:
print("HTTP error when calling ResourceRole.list: %s\n" % e)

```



### Authorization

See [README](../../../README.md#authorization)

### HTTP response details
| Status Code | Type | Description | Content Type |
|-------------|-------------|-------------|------------------|
**200** | ListResourceRolesResponse | | application/json |

[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md)

List the roles on a resource.


### Parameters

Name | Type | Description | Notes |
------------- | ------------- | ------------- | ------------- |
**resource_rid** | ResourceRid | resourceRid | |
**include_inherited** | Optional[bool] | includeInherited | [optional] |
**page_size** | Optional[PageSize] | pageSize | [optional] |
**page_token** | Optional[PageToken] | pageToken | [optional] |
**preview** | Optional[PreviewMode] | preview | [optional] |

### Return type
**ListResourceRolesResponse**

### Example

```python
from foundry.v2 import FoundryClient
import foundry
from pprint import pprint

foundry_client = FoundryClient(
auth=foundry.UserTokenAuth(...), hostname="example.palantirfoundry.com"
)

# ResourceRid | resourceRid
resource_rid = "ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da"
# Optional[bool] | includeInherited
include_inherited = None
# Optional[PageSize] | pageSize
page_size = None
# Optional[PageToken] | pageToken
page_token = None
# Optional[PreviewMode] | preview
preview = None


try:
api_response = foundry_client.filesystem.Resource.ResourceRole.page(
resource_rid,
include_inherited=include_inherited,
page_size=page_size,
page_token=page_token,
preview=preview,
)
print("The page response:\n")
pprint(api_response)
except foundry.PalantirRPCException as e:
print("HTTP error when calling ResourceRole.page: %s\n" % e)

```



### Authorization

See [README](../../../README.md#authorization)

### HTTP response details
| Status Code | Type | Description | Content Type |
|-------------|-------------|-------------|------------------|
**200** | ListResourceRolesResponse | | application/json |

[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md)



### Parameters

Name | Type | Description | Notes |
------------- | ------------- | ------------- | ------------- |
**resource_rid** | ResourceRid | resourceRid | |
**roles** | List[ResourceRoleDict] | | |
**preview** | Optional[PreviewMode] | preview | [optional] |

### Return type
**None**

### Example

```python
from foundry.v2 import FoundryClient
import foundry
from pprint import pprint

foundry_client = FoundryClient(
auth=foundry.UserTokenAuth(...), hostname="example.palantirfoundry.com"
)

# ResourceRid | resourceRid
resource_rid = "ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da"
# List[ResourceRoleDict] |
roles = [{"roleId": "8bf49052-dc37-4528-8bf0-b551cfb71268"}]
# Optional[PreviewMode] | preview
preview = None


try:
api_response = foundry_client.filesystem.Resource.ResourceRole.remove(
resource_rid,
roles=roles,
preview=preview,
)
print("The remove response:\n")
pprint(api_response)
except foundry.PalantirRPCException as e:
print("HTTP error when calling ResourceRole.remove: %s\n" % e)

```



### Authorization

See [README](../../../README.md#authorization)

### HTTP response details
| Status Code | Type | Description | Content Type |
|-------------|-------------|-------------|------------------|
**204** | None | | None |

[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md)

14 changes: 14 additions & 0 deletions docs/v2/core/models/RoleId.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# RoleId

The unique ID for a Role. Roles are sets of permissions that grant different levels of access to resources.
The default roles in Foundry are: Owner, Editor, Viewer, and Discoverer. See more about
[roles](/docs/foundry/security/projects-and-roles#roles) in the user documentation.


## Type
```python
str
```


[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md)
11 changes: 11 additions & 0 deletions docs/v2/filesystem/models/Everyone.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Everyone

A principal representing all users of the platform.

## Properties
| Name | Type | Required | Description |
| ------------ | ------------- | ------------- | ------------- |
**type** | Literal["everyone"] | Yes | None |


[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md)
11 changes: 11 additions & 0 deletions docs/v2/filesystem/models/EveryoneDict.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# EveryoneDict

A principal representing all users of the platform.

## Properties
| Name | Type | Required | Description |
| ------------ | ------------- | ------------- | ------------- |
**type** | Literal["everyone"] | Yes | None |


[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md)
12 changes: 12 additions & 0 deletions docs/v2/filesystem/models/ListResourceRolesResponse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# ListResourceRolesResponse

ListResourceRolesResponse

## Properties
| Name | Type | Required | Description |
| ------------ | ------------- | ------------- | ------------- |
**data** | List[ResourceRole] | Yes | |
**next_page_token** | Optional[PageToken] | No | |


[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md)
12 changes: 12 additions & 0 deletions docs/v2/filesystem/models/ListResourceRolesResponseDict.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# ListResourceRolesResponseDict

ListResourceRolesResponse

## Properties
| Name | Type | Required | Description |
| ------------ | ------------- | ------------- | ------------- |
**data** | List[ResourceRoleDict] | Yes | |
**nextPageToken** | NotRequired[PageToken] | No | |


[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md)
13 changes: 13 additions & 0 deletions docs/v2/filesystem/models/PrincipalWithId.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# PrincipalWithId

Represents a user principal or group principal with an ID.

## Properties
| Name | Type | Required | Description |
| ------------ | ------------- | ------------- | ------------- |
**principal_id** | PrincipalId | Yes | |
**principal_type** | PrincipalType | Yes | |
**type** | Literal["principalWithId"] | Yes | None |


[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md)
13 changes: 13 additions & 0 deletions docs/v2/filesystem/models/PrincipalWithIdDict.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# PrincipalWithIdDict

Represents a user principal or group principal with an ID.

## Properties
| Name | Type | Required | Description |
| ------------ | ------------- | ------------- | ------------- |
**principalId** | PrincipalId | Yes | |
**principalType** | PrincipalType | Yes | |
**type** | Literal["principalWithId"] | Yes | None |


[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md)
Loading