From 7ecf647605d2c94b214c28324138a199adcbd718 Mon Sep 17 00:00:00 2001 From: API Engineering Date: Thu, 30 Jul 2026 12:56:23 +0000 Subject: [PATCH] [bot] Updated client based on openapi-52d8d9c/clientgen --- DO_OPENAPI_COMMIT_SHA.txt | 2 +- src/pydo/_client.py | 6 + src/pydo/aio/_client.py | 6 + src/pydo/aio/operations/__init__.py | 2 + src/pydo/aio/operations/_operations.py | 873 ++++++++++++++++++++---- src/pydo/operations/__init__.py | 2 + src/pydo/operations/_operations.py | 906 +++++++++++++++++++++---- 7 files changed, 1544 insertions(+), 253 deletions(-) diff --git a/DO_OPENAPI_COMMIT_SHA.txt b/DO_OPENAPI_COMMIT_SHA.txt index 7ffb1d26..11ee470c 100644 --- a/DO_OPENAPI_COMMIT_SHA.txt +++ b/DO_OPENAPI_COMMIT_SHA.txt @@ -1 +1 @@ -7e5b46e +52d8d9c diff --git a/src/pydo/_client.py b/src/pydo/_client.py index b190e6ab..b6530040 100644 --- a/src/pydo/_client.py +++ b/src/pydo/_client.py @@ -44,6 +44,7 @@ MonitoringOperations, NfsOperations, OneClicksOperations, + OrganizationsOperations, PartnerAttachmentsOperations, ProjectsOperations, RegionsOperations, @@ -131,6 +132,8 @@ class GeneratedClient: # pylint: disable=client-accepts-api-version-keyword,too :vartype monitoring: pydo.operations.MonitoringOperations :ivar nfs: NfsOperations operations :vartype nfs: pydo.operations.NfsOperations + :ivar organizations: OrganizationsOperations operations + :vartype organizations: pydo.operations.OrganizationsOperations :ivar partner_attachments: PartnerAttachmentsOperations operations :vartype partner_attachments: pydo.operations.PartnerAttachmentsOperations :ivar projects: ProjectsOperations operations @@ -306,6 +309,9 @@ def __init__( self.nfs = NfsOperations( self._client, self._config, self._serialize, self._deserialize ) + self.organizations = OrganizationsOperations( + self._client, self._config, self._serialize, self._deserialize + ) self.partner_attachments = PartnerAttachmentsOperations( self._client, self._config, self._serialize, self._deserialize ) diff --git a/src/pydo/aio/_client.py b/src/pydo/aio/_client.py index 6a8b62f4..74395f92 100644 --- a/src/pydo/aio/_client.py +++ b/src/pydo/aio/_client.py @@ -44,6 +44,7 @@ MonitoringOperations, NfsOperations, OneClicksOperations, + OrganizationsOperations, PartnerAttachmentsOperations, ProjectsOperations, RegionsOperations, @@ -131,6 +132,8 @@ class GeneratedClient: # pylint: disable=client-accepts-api-version-keyword,too :vartype monitoring: pydo.aio.operations.MonitoringOperations :ivar nfs: NfsOperations operations :vartype nfs: pydo.aio.operations.NfsOperations + :ivar organizations: OrganizationsOperations operations + :vartype organizations: pydo.aio.operations.OrganizationsOperations :ivar partner_attachments: PartnerAttachmentsOperations operations :vartype partner_attachments: pydo.aio.operations.PartnerAttachmentsOperations :ivar projects: ProjectsOperations operations @@ -306,6 +309,9 @@ def __init__( self.nfs = NfsOperations( self._client, self._config, self._serialize, self._deserialize ) + self.organizations = OrganizationsOperations( + self._client, self._config, self._serialize, self._deserialize + ) self.partner_attachments = PartnerAttachmentsOperations( self._client, self._config, self._serialize, self._deserialize ) diff --git a/src/pydo/aio/operations/__init__.py b/src/pydo/aio/operations/__init__.py index 2de68fec..e3577712 100644 --- a/src/pydo/aio/operations/__init__.py +++ b/src/pydo/aio/operations/__init__.py @@ -31,6 +31,7 @@ from ._operations import LoadBalancersOperations from ._operations import MonitoringOperations from ._operations import NfsOperations +from ._operations import OrganizationsOperations from ._operations import PartnerAttachmentsOperations from ._operations import ProjectsOperations from ._operations import RegionsOperations @@ -90,6 +91,7 @@ "LoadBalancersOperations", "MonitoringOperations", "NfsOperations", + "OrganizationsOperations", "PartnerAttachmentsOperations", "ProjectsOperations", "RegionsOperations", diff --git a/src/pydo/aio/operations/_operations.py b/src/pydo/aio/operations/_operations.py index 120e722d..812b35d5 100644 --- a/src/pydo/aio/operations/_operations.py +++ b/src/pydo/aio/operations/_operations.py @@ -528,6 +528,8 @@ build_nfs_list_snapshot_request, build_one_clicks_install_kubernetes_request, build_one_clicks_list_request, + build_organizations_create_team_request, + build_organizations_list_teams_request, build_partner_attachments_create_request, build_partner_attachments_create_service_key_request, build_partner_attachments_delete_request, @@ -13446,7 +13448,7 @@ async def create( }, "project_id": "str" # Optional. The ID of the project the app should be assigned to. If omitted, it will be assigned to your default project. - :code:`
`:code:`
`Requires ``project:update`` scope. + :code:`
`:code:`
`Requires ``project:assign_resource`` scope. } # response body for status code(s): 200 @@ -30169,7 +30171,7 @@ async def create(self, body: Union[JSON, IO[bytes]], **kwargs: Any) -> JSON: }, "project_id": "str" # Optional. The ID of the project the app should be assigned to. If omitted, it will be assigned to your default project. - :code:`
`:code:`
`Requires ``project:update`` scope. + :code:`
`:code:`
`Requires ``project:assign_resource`` scope. } # response body for status code(s): 200 @@ -111450,8 +111452,10 @@ async def list_clusters( } ], "pg_allow_replication": bool # - Optional. For Postgres clusters, set to ``true`` for a user - with replication rights. This option is not currently + Optional. For PostgreSQL clusters, set to ``true`` to grant + the user replication privileges. When omitted on create or + update, the value defaults to ``false`` and replication + privileges are not granted. This option is not currently supported for other database engines. } } @@ -111727,7 +111731,7 @@ async def create_cluster( "project_id": "str", # Optional. The ID of the project that the database cluster is assigned to. If excluded when creating a new database cluster, it will be assigned to your default project.:code:`
`:code:`
`Requires - ``project:update`` scope. + ``project:assign_resource`` scope. "rules": [ { "type": "str", # The type of resource that the firewall rule @@ -111904,9 +111908,10 @@ async def create_cluster( } ], "pg_allow_replication": bool # Optional. For - Postgres clusters, set to ``true`` for a user with replication - rights. This option is not currently supported for other database - engines. + PostgreSQL clusters, set to ``true`` to grant the user replication + privileges. When omitted on create or update, the value defaults to + ``false`` and replication privileges are not granted. This option is + not currently supported for other database engines. } } ], @@ -112208,9 +112213,11 @@ async def create_cluster( } ], "pg_allow_replication": bool # Optional. For - Postgres clusters, set to ``true`` for a user with replication - rights. This option is not currently supported for other database - engines. + PostgreSQL clusters, set to ``true`` to grant the user + replication privileges. When omitted on create or update, the + value defaults to ``false`` and replication privileges are not + granted. This option is not currently supported for other + database engines. } } ], @@ -112581,9 +112588,11 @@ async def create_cluster( } ], "pg_allow_replication": bool # Optional. For - Postgres clusters, set to ``true`` for a user with replication - rights. This option is not currently supported for other database - engines. + PostgreSQL clusters, set to ``true`` to grant the user + replication privileges. When omitted on create or update, the + value defaults to ``false`` and replication privileges are not + granted. This option is not currently supported for other + database engines. } } ], @@ -112775,7 +112784,7 @@ async def create_cluster(self, body: Union[JSON, IO[bytes]], **kwargs: Any) -> J "project_id": "str", # Optional. The ID of the project that the database cluster is assigned to. If excluded when creating a new database cluster, it will be assigned to your default project.:code:`
`:code:`
`Requires - ``project:update`` scope. + ``project:assign_resource`` scope. "rules": [ { "type": "str", # The type of resource that the firewall rule @@ -112952,9 +112961,10 @@ async def create_cluster(self, body: Union[JSON, IO[bytes]], **kwargs: Any) -> J } ], "pg_allow_replication": bool # Optional. For - Postgres clusters, set to ``true`` for a user with replication - rights. This option is not currently supported for other database - engines. + PostgreSQL clusters, set to ``true`` to grant the user replication + privileges. When omitted on create or update, the value defaults to + ``false`` and replication privileges are not granted. This option is + not currently supported for other database engines. } } ], @@ -113256,9 +113266,11 @@ async def create_cluster(self, body: Union[JSON, IO[bytes]], **kwargs: Any) -> J } ], "pg_allow_replication": bool # Optional. For - Postgres clusters, set to ``true`` for a user with replication - rights. This option is not currently supported for other database - engines. + PostgreSQL clusters, set to ``true`` to grant the user + replication privileges. When omitted on create or update, the + value defaults to ``false`` and replication privileges are not + granted. This option is not currently supported for other + database engines. } } ], @@ -113692,9 +113704,11 @@ async def get_cluster(self, database_cluster_uuid: str, **kwargs: Any) -> JSON: } ], "pg_allow_replication": bool # Optional. For - Postgres clusters, set to ``true`` for a user with replication - rights. This option is not currently supported for other database - engines. + PostgreSQL clusters, set to ``true`` to grant the user + replication privileges. When omitted on create or update, the + value defaults to ``false`` and replication privileges are not + granted. This option is not currently supported for other + database engines. } } ], @@ -115506,10 +115520,11 @@ async def update_firewall_rules( resources should be able to open connections to the database. You may limit connections to specific Droplets, Kubernetes clusters, or IP addresses. When a tag is provided, any Droplet or Kubernetes node with that tag applied to it will have access. The firewall is limited to 100 - rules (or trusted sources). When possible, we recommend `placing your databases into a VPC - network `_ to limit access to them - instead of using a firewall. - A successful. + rules (or trusted sources). You cannot add IPv6 addresses as trusted sources. For additional + limits, see your database engine's limits page. When possible, we recommend `placing your + databases into a VPC network `_ to + limit access to them instead of using a firewall. + A successful request returns a 204 status code with no content. :param database_cluster_uuid: A unique identifier for a database cluster. Required. :type database_cluster_uuid: str @@ -115578,10 +115593,11 @@ async def update_firewall_rules( resources should be able to open connections to the database. You may limit connections to specific Droplets, Kubernetes clusters, or IP addresses. When a tag is provided, any Droplet or Kubernetes node with that tag applied to it will have access. The firewall is limited to 100 - rules (or trusted sources). When possible, we recommend `placing your databases into a VPC - network `_ to limit access to them - instead of using a firewall. - A successful. + rules (or trusted sources). You cannot add IPv6 addresses as trusted sources. For additional + limits, see your database engine's limits page. When possible, we recommend `placing your + databases into a VPC network `_ to + limit access to them instead of using a firewall. + A successful request returns a 204 status code with no content. :param database_cluster_uuid: A unique identifier for a database cluster. Required. :type database_cluster_uuid: str @@ -115622,10 +115638,11 @@ async def update_firewall_rules( resources should be able to open connections to the database. You may limit connections to specific Droplets, Kubernetes clusters, or IP addresses. When a tag is provided, any Droplet or Kubernetes node with that tag applied to it will have access. The firewall is limited to 100 - rules (or trusted sources). When possible, we recommend `placing your databases into a VPC - network `_ to limit access to them - instead of using a firewall. - A successful. + rules (or trusted sources). You cannot add IPv6 addresses as trusted sources. For additional + limits, see your database engine's limits page. When possible, we recommend `placing your + databases into a VPC network `_ to + limit access to them instead of using a firewall. + A successful request returns a 204 status code with no content. :param database_cluster_uuid: A unique identifier for a database cluster. Required. :type database_cluster_uuid: str @@ -118038,6 +118055,11 @@ async def list_users(self, database_cluster_uuid: str, **kwargs: Any) -> JSON: For MySQL clusters, additional options will be contained in the mysql_settings object. + For PostgreSQL clusters, additional options will be contained in the ``settings`` + object (for example, ``pg_allow_replication``\\ ). + + For Kafka clusters, additional options will be contained in the ``settings`` object. + For MongoDB clusters, additional information will be contained in the mongo_user_settings object. @@ -118128,9 +118150,10 @@ async def list_users(self, database_cluster_uuid: str, **kwargs: Any) -> JSON: } ], "pg_allow_replication": bool # Optional. For - Postgres clusters, set to ``true`` for a user with replication - rights. This option is not currently supported for other database - engines. + PostgreSQL clusters, set to ``true`` to grant the user replication + privileges. When omitted on create or update, the value defaults to + ``false`` and replication privileges are not granted. This option is + not currently supported for other database engines. } } ] @@ -118245,10 +118268,14 @@ async def add_user( When adding a user to a MySQL cluster, additional options can be configured in the ``mysql_settings`` object. + When adding a user to a PostgreSQL cluster, additional options can be configured in + the ``settings`` object (for example, ``pg_allow_replication``\\ ). When + ``pg_allow_replication`` is omitted, it defaults to ``false``. + When adding a user to a Kafka cluster, additional options can be configured in the ``settings`` object. - When adding a user to a MongoDB cluster, additional options can be configured in + When adding a user to a MongoDB cluster, additional options can be configured in the ``settings.mongo_user_settings`` object. The response will be a JSON object with a key called ``user``. The value of this will be an @@ -118340,9 +118367,11 @@ async def add_user( values are: "deny", "admin", "read", "readwrite", and "write". } ], - "pg_allow_replication": bool # Optional. For Postgres clusters, set - to ``true`` for a user with replication rights. This option is not currently - supported for other database engines. + "pg_allow_replication": bool # Optional. For PostgreSQL clusters, + set to ``true`` to grant the user replication privileges. When omitted on + create or update, the value defaults to ``false`` and replication privileges + are not granted. This option is not currently supported for other database + engines. } } @@ -118417,9 +118446,11 @@ async def add_user( "readwrite", and "write". } ], - "pg_allow_replication": bool # Optional. For Postgres - clusters, set to ``true`` for a user with replication rights. This option - is not currently supported for other database engines. + "pg_allow_replication": bool # Optional. For PostgreSQL + clusters, set to ``true`` to grant the user replication privileges. When + omitted on create or update, the value defaults to ``false`` and + replication privileges are not granted. This option is not currently + supported for other database engines. } } } @@ -118456,10 +118487,14 @@ async def add_user( When adding a user to a MySQL cluster, additional options can be configured in the ``mysql_settings`` object. + When adding a user to a PostgreSQL cluster, additional options can be configured in + the ``settings`` object (for example, ``pg_allow_replication``\\ ). When + ``pg_allow_replication`` is omitted, it defaults to ``false``. + When adding a user to a Kafka cluster, additional options can be configured in the ``settings`` object. - When adding a user to a MongoDB cluster, additional options can be configured in + When adding a user to a MongoDB cluster, additional options can be configured in the ``settings.mongo_user_settings`` object. The response will be a JSON object with a key called ``user``. The value of this will be an @@ -118551,9 +118586,11 @@ async def add_user( "readwrite", and "write". } ], - "pg_allow_replication": bool # Optional. For Postgres - clusters, set to ``true`` for a user with replication rights. This option - is not currently supported for other database engines. + "pg_allow_replication": bool # Optional. For PostgreSQL + clusters, set to ``true`` to grant the user replication privileges. When + omitted on create or update, the value defaults to ``false`` and + replication privileges are not granted. This option is not currently + supported for other database engines. } } } @@ -118585,10 +118622,14 @@ async def add_user( When adding a user to a MySQL cluster, additional options can be configured in the ``mysql_settings`` object. + When adding a user to a PostgreSQL cluster, additional options can be configured in + the ``settings`` object (for example, ``pg_allow_replication``\\ ). When + ``pg_allow_replication`` is omitted, it defaults to ``false``. + When adding a user to a Kafka cluster, additional options can be configured in the ``settings`` object. - When adding a user to a MongoDB cluster, additional options can be configured in + When adding a user to a MongoDB cluster, additional options can be configured in the ``settings.mongo_user_settings`` object. The response will be a JSON object with a key called ``user``. The value of this will be an @@ -118677,9 +118718,11 @@ async def add_user( values are: "deny", "admin", "read", "readwrite", and "write". } ], - "pg_allow_replication": bool # Optional. For Postgres clusters, set - to ``true`` for a user with replication rights. This option is not currently - supported for other database engines. + "pg_allow_replication": bool # Optional. For PostgreSQL clusters, + set to ``true`` to grant the user replication privileges. When omitted on + create or update, the value defaults to ``false`` and replication privileges + are not granted. This option is not currently supported for other database + engines. } } @@ -118754,9 +118797,11 @@ async def add_user( "readwrite", and "write". } ], - "pg_allow_replication": bool # Optional. For Postgres - clusters, set to ``true`` for a user with replication rights. This option - is not currently supported for other database engines. + "pg_allow_replication": bool # Optional. For PostgreSQL + clusters, set to ``true`` to grant the user replication privileges. When + omitted on create or update, the value defaults to ``false`` and + replication privileges are not granted. This option is not currently + supported for other database engines. } } } @@ -118883,6 +118928,9 @@ async def get_user( For MySQL clusters, additional options will be contained in the ``mysql_settings`` object. + For PostgreSQL clusters, additional options will be contained in the ``settings`` + object (for example, ``pg_allow_replication``\\ ). + For Kafka clusters, additional options will be contained in the ``settings`` object. For MongoDB clusters, additional information will be contained in the mongo_user_settings @@ -118970,9 +119018,11 @@ async def get_user( "readwrite", and "write". } ], - "pg_allow_replication": bool # Optional. For Postgres - clusters, set to ``true`` for a user with replication rights. This option - is not currently supported for other database engines. + "pg_allow_replication": bool # Optional. For PostgreSQL + clusters, set to ``true`` to grant the user replication privileges. When + omitted on create or update, the value defaults to ``false`` and + replication privileges are not granted. This option is not currently + supported for other database engines. } } } @@ -119201,8 +119251,14 @@ async def update_user( the name of a user, you must recreate a new user. + For PostgreSQL clusters, you can update ``settings.pg_allow_replication`` to enable or + disable replication privileges for the user. When omitted, the value defaults to ``false``. + + For Kafka and OpenSearch clusters, additional options can be configured in the + ``settings`` object (for example, topic or index ACLs). + The response will be a JSON object with a key called ``user``. The value of this will be an - object that contains the name of the update database user, along with the ``settings`` object + object that contains the name of the updated database user, along with the ``settings`` object that has been updated. @@ -119271,9 +119327,11 @@ async def update_user( values are: "deny", "admin", "read", "readwrite", and "write". } ], - "pg_allow_replication": bool # Optional. For Postgres clusters, set - to ``true`` for a user with replication rights. This option is not currently - supported for other database engines. + "pg_allow_replication": bool # Optional. For PostgreSQL clusters, + set to ``true`` to grant the user replication privileges. When omitted on + create or update, the value defaults to ``false`` and replication privileges + are not granted. This option is not currently supported for other database + engines. } } @@ -119348,9 +119406,11 @@ async def update_user( "readwrite", and "write". } ], - "pg_allow_replication": bool # Optional. For Postgres - clusters, set to ``true`` for a user with replication rights. This option - is not currently supported for other database engines. + "pg_allow_replication": bool # Optional. For PostgreSQL + clusters, set to ``true`` to grant the user replication privileges. When + omitted on create or update, the value defaults to ``false`` and + replication privileges are not granted. This option is not currently + supported for other database engines. } } } @@ -119388,8 +119448,14 @@ async def update_user( the name of a user, you must recreate a new user. + For PostgreSQL clusters, you can update ``settings.pg_allow_replication`` to enable or + disable replication privileges for the user. When omitted, the value defaults to ``false``. + + For Kafka and OpenSearch clusters, additional options can be configured in the + ``settings`` object (for example, topic or index ACLs). + The response will be a JSON object with a key called ``user``. The value of this will be an - object that contains the name of the update database user, along with the ``settings`` object + object that contains the name of the updated database user, along with the ``settings`` object that has been updated. @@ -119480,9 +119546,11 @@ async def update_user( "readwrite", and "write". } ], - "pg_allow_replication": bool # Optional. For Postgres - clusters, set to ``true`` for a user with replication rights. This option - is not currently supported for other database engines. + "pg_allow_replication": bool # Optional. For PostgreSQL + clusters, set to ``true`` to grant the user replication privileges. When + omitted on create or update, the value defaults to ``false`` and + replication privileges are not granted. This option is not currently + supported for other database engines. } } } @@ -119518,8 +119586,14 @@ async def update_user( the name of a user, you must recreate a new user. + For PostgreSQL clusters, you can update ``settings.pg_allow_replication`` to enable or + disable replication privileges for the user. When omitted, the value defaults to ``false``. + + For Kafka and OpenSearch clusters, additional options can be configured in the + ``settings`` object (for example, topic or index ACLs). + The response will be a JSON object with a key called ``user``. The value of this will be an - object that contains the name of the update database user, along with the ``settings`` object + object that contains the name of the updated database user, along with the ``settings`` object that has been updated. @@ -119585,9 +119659,11 @@ async def update_user( values are: "deny", "admin", "read", "readwrite", and "write". } ], - "pg_allow_replication": bool # Optional. For Postgres clusters, set - to ``true`` for a user with replication rights. This option is not currently - supported for other database engines. + "pg_allow_replication": bool # Optional. For PostgreSQL clusters, + set to ``true`` to grant the user replication privileges. When omitted on + create or update, the value defaults to ``false`` and replication privileges + are not granted. This option is not currently supported for other database + engines. } } @@ -119662,9 +119738,11 @@ async def update_user( "readwrite", and "write". } ], - "pg_allow_replication": bool # Optional. For Postgres - clusters, set to ``true`` for a user with replication rights. This option - is not currently supported for other database engines. + "pg_allow_replication": bool # Optional. For PostgreSQL + clusters, set to ``true`` to grant the user replication privileges. When + omitted on create or update, the value defaults to ``false`` and + replication privileges are not granted. This option is not currently + supported for other database engines. } } } @@ -119895,9 +119973,11 @@ async def reset_auth( "readwrite", and "write". } ], - "pg_allow_replication": bool # Optional. For Postgres - clusters, set to ``true`` for a user with replication rights. This option - is not currently supported for other database engines. + "pg_allow_replication": bool # Optional. For PostgreSQL + clusters, set to ``true`` to grant the user replication privileges. When + omitted on create or update, the value defaults to ``false`` and + replication privileges are not granted. This option is not currently + supported for other database engines. } } } @@ -120024,9 +120104,11 @@ async def reset_auth( "readwrite", and "write". } ], - "pg_allow_replication": bool # Optional. For Postgres - clusters, set to ``true`` for a user with replication rights. This option - is not currently supported for other database engines. + "pg_allow_replication": bool # Optional. For PostgreSQL + clusters, set to ``true`` to grant the user replication privileges. When + omitted on create or update, the value defaults to ``false`` and + replication privileges are not granted. This option is not currently + supported for other database engines. } } } @@ -120160,9 +120242,11 @@ async def reset_auth( "readwrite", and "write". } ], - "pg_allow_replication": bool # Optional. For Postgres - clusters, set to ``true`` for a user with replication rights. This option - is not currently supported for other database engines. + "pg_allow_replication": bool # Optional. For PostgreSQL + clusters, set to ``true`` to grant the user replication privileges. When + omitted on create or update, the value defaults to ``false`` and + replication privileges are not granted. This option is not currently + supported for other database engines. } } } @@ -133724,9 +133808,10 @@ class of Droplets created from this size. For example: Basic, General The unit of measure for the disk size. }, "type": "str" # Optional. The type - of disk. All Droplets contain a ``local`` disk. Additionally, - GPU Droplets can also have a ``scratch`` disk for - non-persistent data. Known values are: "local" and "scratch". + of disk. All Droplets contain a ``local`` or ``remote`` disk. + Additionally, GPU Droplets can also have a ``scratch`` disk + for non-persistent data. Known values are: "local", "remote", + and "scratch". } ], "gpu_info": { @@ -133771,9 +133856,10 @@ class of Droplets created from this size. For example: Basic, General of measure for the disk size. }, "type": "str" # Optional. The type of disk. - All Droplets contain a ``local`` disk. Additionally, GPU Droplets - can also have a ``scratch`` disk for non-persistent data. Known - values are: "local" and "scratch". + All Droplets contain a ``local`` or ``remote`` disk. + Additionally, GPU Droplets can also have a ``scratch`` disk for + non-persistent data. Known values are: "local", "remote", and + "scratch". } ], "gpu_info": { @@ -134397,9 +134483,10 @@ async def get(self, droplet_id: int, **kwargs: Any) -> JSON: of measure for the disk size. }, "type": "str" # Optional. The type of disk. - All Droplets contain a ``local`` disk. Additionally, GPU Droplets - can also have a ``scratch`` disk for non-persistent data. Known - values are: "local" and "scratch". + All Droplets contain a ``local`` or ``remote`` disk. + Additionally, GPU Droplets can also have a ``scratch`` disk for + non-persistent data. Known values are: "local", "remote", and + "scratch". } ], "gpu_info": { @@ -134442,9 +134529,9 @@ async def get(self, droplet_id: int, **kwargs: Any) -> JSON: measure for the disk size. }, "type": "str" # Optional. The type of disk. All - Droplets contain a ``local`` disk. Additionally, GPU Droplets can - also have a ``scratch`` disk for non-persistent data. Known values - are: "local" and "scratch". + Droplets contain a ``local`` or ``remote`` disk. Additionally, GPU + Droplets can also have a ``scratch`` disk for non-persistent data. + Known values are: "local", "remote", and "scratch". } ], "gpu_info": { @@ -135970,9 +136057,10 @@ class of Droplets created from this size. For example: Basic, General The unit of measure for the disk size. }, "type": "str" # Optional. The type - of disk. All Droplets contain a ``local`` disk. Additionally, - GPU Droplets can also have a ``scratch`` disk for - non-persistent data. Known values are: "local" and "scratch". + of disk. All Droplets contain a ``local`` or ``remote`` disk. + Additionally, GPU Droplets can also have a ``scratch`` disk + for non-persistent data. Known values are: "local", "remote", + and "scratch". } ], "gpu_info": { @@ -136017,9 +136105,10 @@ class of Droplets created from this size. For example: Basic, General of measure for the disk size. }, "type": "str" # Optional. The type of disk. - All Droplets contain a ``local`` disk. Additionally, GPU Droplets - can also have a ``scratch`` disk for non-persistent data. Known - values are: "local" and "scratch". + All Droplets contain a ``local`` or ``remote`` disk. + Additionally, GPU Droplets can also have a ``scratch`` disk for + non-persistent data. Known values are: "local", "remote", and + "scratch". } ], "gpu_info": { @@ -150188,6 +150277,10 @@ async def list_clusters( "enabled": bool # Optional. Indicates whether the Nvidia GPU Device Plugin is enabled. }, + "p2p_oci_registry_plugin": { + "enabled": bool # Optional. Indicates whether the + Peer-to-peer OCI registry component is enabled. + }, "rdma_shared_dev_plugin": { "enabled": bool # Optional. Indicates whether the RDMA shared device plugin is enabled. @@ -150500,6 +150593,10 @@ async def create_cluster( "enabled": bool # Optional. Indicates whether the Nvidia GPU Device Plugin is enabled. }, + "p2p_oci_registry_plugin": { + "enabled": bool # Optional. Indicates whether the Peer-to-peer OCI + registry component is enabled. + }, "rdma_shared_dev_plugin": { "enabled": bool # Optional. Indicates whether the RDMA shared device plugin is enabled. @@ -150719,6 +150816,10 @@ async def create_cluster( "enabled": bool # Optional. Indicates whether the Nvidia GPU Device Plugin is enabled. }, + "p2p_oci_registry_plugin": { + "enabled": bool # Optional. Indicates whether the + Peer-to-peer OCI registry component is enabled. + }, "rdma_shared_dev_plugin": { "enabled": bool # Optional. Indicates whether the RDMA shared device plugin is enabled. @@ -150971,6 +151072,10 @@ async def create_cluster( "enabled": bool # Optional. Indicates whether the Nvidia GPU Device Plugin is enabled. }, + "p2p_oci_registry_plugin": { + "enabled": bool # Optional. Indicates whether the + Peer-to-peer OCI registry component is enabled. + }, "rdma_shared_dev_plugin": { "enabled": bool # Optional. Indicates whether the RDMA shared device plugin is enabled. @@ -151209,6 +151314,10 @@ async def create_cluster(self, body: Union[JSON, IO[bytes]], **kwargs: Any) -> J "enabled": bool # Optional. Indicates whether the Nvidia GPU Device Plugin is enabled. }, + "p2p_oci_registry_plugin": { + "enabled": bool # Optional. Indicates whether the Peer-to-peer OCI + registry component is enabled. + }, "rdma_shared_dev_plugin": { "enabled": bool # Optional. Indicates whether the RDMA shared device plugin is enabled. @@ -151428,6 +151537,10 @@ async def create_cluster(self, body: Union[JSON, IO[bytes]], **kwargs: Any) -> J "enabled": bool # Optional. Indicates whether the Nvidia GPU Device Plugin is enabled. }, + "p2p_oci_registry_plugin": { + "enabled": bool # Optional. Indicates whether the + Peer-to-peer OCI registry component is enabled. + }, "rdma_shared_dev_plugin": { "enabled": bool # Optional. Indicates whether the RDMA shared device plugin is enabled. @@ -151741,6 +151854,10 @@ async def get_cluster(self, cluster_id: str, **kwargs: Any) -> JSON: "enabled": bool # Optional. Indicates whether the Nvidia GPU Device Plugin is enabled. }, + "p2p_oci_registry_plugin": { + "enabled": bool # Optional. Indicates whether the + Peer-to-peer OCI registry component is enabled. + }, "rdma_shared_dev_plugin": { "enabled": bool # Optional. Indicates whether the RDMA shared device plugin is enabled. @@ -151983,6 +152100,10 @@ async def update_cluster( "enabled": bool # Optional. Indicates whether the Nvidia GPU Device Plugin is enabled. }, + "p2p_oci_registry_plugin": { + "enabled": bool # Optional. Indicates whether the Peer-to-peer OCI + registry component is enabled. + }, "rdma_shared_dev_plugin": { "enabled": bool # Optional. Indicates whether the RDMA shared device plugin is enabled. @@ -152179,6 +152300,10 @@ async def update_cluster( "enabled": bool # Optional. Indicates whether the Nvidia GPU Device Plugin is enabled. }, + "p2p_oci_registry_plugin": { + "enabled": bool # Optional. Indicates whether the + Peer-to-peer OCI registry component is enabled. + }, "rdma_shared_dev_plugin": { "enabled": bool # Optional. Indicates whether the RDMA shared device plugin is enabled. @@ -152443,6 +152568,10 @@ async def update_cluster( "enabled": bool # Optional. Indicates whether the Nvidia GPU Device Plugin is enabled. }, + "p2p_oci_registry_plugin": { + "enabled": bool # Optional. Indicates whether the + Peer-to-peer OCI registry component is enabled. + }, "rdma_shared_dev_plugin": { "enabled": bool # Optional. Indicates whether the RDMA shared device plugin is enabled. @@ -152600,6 +152729,10 @@ async def update_cluster( "enabled": bool # Optional. Indicates whether the Nvidia GPU Device Plugin is enabled. }, + "p2p_oci_registry_plugin": { + "enabled": bool # Optional. Indicates whether the Peer-to-peer OCI + registry component is enabled. + }, "rdma_shared_dev_plugin": { "enabled": bool # Optional. Indicates whether the RDMA shared device plugin is enabled. @@ -152796,6 +152929,10 @@ async def update_cluster( "enabled": bool # Optional. Indicates whether the Nvidia GPU Device Plugin is enabled. }, + "p2p_oci_registry_plugin": { + "enabled": bool # Optional. Indicates whether the + Peer-to-peer OCI registry component is enabled. + }, "rdma_shared_dev_plugin": { "enabled": bool # Optional. Indicates whether the RDMA shared device plugin is enabled. @@ -174396,6 +174533,483 @@ async def delete_access_point(self, access_point_id: str, **kwargs: Any) -> JSON return cast(JSON, deserialized) # type: ignore +class OrganizationsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~pydo.aio.GeneratedClient`'s + :attr:`organizations` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = ( + input_args.pop(0) if input_args else kwargs.pop("deserializer") + ) + + @overload + async def create_team( + self, body: JSON, *, content_type: str = "application/json", **kwargs: Any + ) -> JSON: + # pylint: disable=line-too-long + """Create a Team in an Organization. + + To create a new team within an organization, send a POST request to + ``/v2/organizations/team``. + + This endpoint must be called in an organization context. Optionally include + ``invitations`` to invite users to the new team. The ``owner`` role cannot be + assigned via invitation. + + :param body: Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: JSON object + :rtype: JSON + :raises ~azure.core.exceptions.HttpResponseError: + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + body = { + "name": "str", # The human-readable name for the team to create. Required. + "invitations": [ + { + "email": "str", # The email address of the user to invite. + Required. + "role": "str" # The role to assign to the invited user. The + ``owner`` role cannot be assigned via invitation. Required. Known values + are: "member", "biller", "billing viewer", "resource viewer", and + "modifier". + } + ] + } + + # response body for status code(s): 201 + response == { + "team": { + "name": "str", # The human-readable name for the newly created team. + Required. + "uuid": "str" # A unique universal identifier for the newly created + team. Required. + }, + "invitations": { + "str": { + "status": "str" # Optional. The invitation delivery status + for the email address. Known values are: "ok" and + "daily_invite_limit_reached". + } + } + } + # response body for status code(s): 400, 403, 412 + response == { + "id": "str", # A short identifier corresponding to the HTTP status code + returned. For example, the ID for a response returning a 404 status code would + be "not_found.". Required. + "message": "str", # A message providing additional information about the + error, including details to help resolve it when possible. Required. + "request_id": "str" # Optional. Optionally, some endpoints may include a + request ID that should be provided when reporting bugs or opening support + tickets to help identify the issue. + } + """ + + @overload + async def create_team( + self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any + ) -> JSON: + # pylint: disable=line-too-long + """Create a Team in an Organization. + + To create a new team within an organization, send a POST request to + ``/v2/organizations/team``. + + This endpoint must be called in an organization context. Optionally include + ``invitations`` to invite users to the new team. The ``owner`` role cannot be + assigned via invitation. + + :param body: Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: JSON object + :rtype: JSON + :raises ~azure.core.exceptions.HttpResponseError: + + Example: + .. code-block:: python + + # response body for status code(s): 201 + response == { + "team": { + "name": "str", # The human-readable name for the newly created team. + Required. + "uuid": "str" # A unique universal identifier for the newly created + team. Required. + }, + "invitations": { + "str": { + "status": "str" # Optional. The invitation delivery status + for the email address. Known values are: "ok" and + "daily_invite_limit_reached". + } + } + } + # response body for status code(s): 400, 403, 412 + response == { + "id": "str", # A short identifier corresponding to the HTTP status code + returned. For example, the ID for a response returning a 404 status code would + be "not_found.". Required. + "message": "str", # A message providing additional information about the + error, including details to help resolve it when possible. Required. + "request_id": "str" # Optional. Optionally, some endpoints may include a + request ID that should be provided when reporting bugs or opening support + tickets to help identify the issue. + } + """ + + @distributed_trace_async + async def create_team(self, body: Union[JSON, IO[bytes]], **kwargs: Any) -> JSON: + # pylint: disable=line-too-long + """Create a Team in an Organization. + + To create a new team within an organization, send a POST request to + ``/v2/organizations/team``. + + This endpoint must be called in an organization context. Optionally include + ``invitations`` to invite users to the new team. The ``owner`` role cannot be + assigned via invitation. + + :param body: Is either a JSON type or a IO[bytes] type. Required. + :type body: JSON or IO[bytes] + :return: JSON object + :rtype: JSON + :raises ~azure.core.exceptions.HttpResponseError: + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + body = { + "name": "str", # The human-readable name for the team to create. Required. + "invitations": [ + { + "email": "str", # The email address of the user to invite. + Required. + "role": "str" # The role to assign to the invited user. The + ``owner`` role cannot be assigned via invitation. Required. Known values + are: "member", "biller", "billing viewer", "resource viewer", and + "modifier". + } + ] + } + + # response body for status code(s): 201 + response == { + "team": { + "name": "str", # The human-readable name for the newly created team. + Required. + "uuid": "str" # A unique universal identifier for the newly created + team. Required. + }, + "invitations": { + "str": { + "status": "str" # Optional. The invitation delivery status + for the email address. Known values are: "ok" and + "daily_invite_limit_reached". + } + } + } + # response body for status code(s): 400, 403, 412 + response == { + "id": "str", # A short identifier corresponding to the HTTP status code + returned. For example, the ID for a response returning a 404 status code would + be "not_found.". Required. + "message": "str", # A message providing additional information about the + error, including details to help resolve it when possible. Required. + "request_id": "str" # Optional. Optionally, some endpoints may include a + request ID that should be provided when reporting bugs or opening support + tickets to help identify the issue. + } + """ + error_map: MutableMapping[int, Type[HttpResponseError]] = { + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + 401: cast( + Type[HttpResponseError], + lambda response: ClientAuthenticationError(response=response), + ), + 429: HttpResponseError, + 500: HttpResponseError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop( + "content_type", _headers.pop("Content-Type", None) + ) + cls: ClsType[JSON] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _json = body + + _request = build_organizations_create_team_request( + content_type=content_type, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = ( + await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + ) + + response = pipeline_response.http_response + + if response.status_code not in [201, 400, 403, 412]: + if _stream: + await response.read() # Load the body in memory and close the socket + map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + raise HttpResponseError(response=response) + + response_headers = {} + if response.status_code == 201: + response_headers["ratelimit-limit"] = self._deserialize( + "int", response.headers.get("ratelimit-limit") + ) + response_headers["ratelimit-remaining"] = self._deserialize( + "int", response.headers.get("ratelimit-remaining") + ) + response_headers["ratelimit-reset"] = self._deserialize( + "int", response.headers.get("ratelimit-reset") + ) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if response.status_code == 400: + response_headers["ratelimit-limit"] = self._deserialize( + "int", response.headers.get("ratelimit-limit") + ) + response_headers["ratelimit-remaining"] = self._deserialize( + "int", response.headers.get("ratelimit-remaining") + ) + response_headers["ratelimit-reset"] = self._deserialize( + "int", response.headers.get("ratelimit-reset") + ) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if response.status_code == 403: + response_headers["ratelimit-limit"] = self._deserialize( + "int", response.headers.get("ratelimit-limit") + ) + response_headers["ratelimit-remaining"] = self._deserialize( + "int", response.headers.get("ratelimit-remaining") + ) + response_headers["ratelimit-reset"] = self._deserialize( + "int", response.headers.get("ratelimit-reset") + ) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if response.status_code == 412: + response_headers["ratelimit-limit"] = self._deserialize( + "int", response.headers.get("ratelimit-limit") + ) + response_headers["ratelimit-remaining"] = self._deserialize( + "int", response.headers.get("ratelimit-remaining") + ) + response_headers["ratelimit-reset"] = self._deserialize( + "int", response.headers.get("ratelimit-reset") + ) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), response_headers) # type: ignore + + return cast(JSON, deserialized) # type: ignore + + @distributed_trace_async + async def list_teams(self, **kwargs: Any) -> JSON: + # pylint: disable=line-too-long + """List Teams in an Organization. + + To list all teams in an organization, send a GET request to + ``/v2/organizations/teams``. + + This endpoint must be called in an organization context. + + :return: JSON object + :rtype: JSON + :raises ~azure.core.exceptions.HttpResponseError: + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response == { + "teams": [ + { + "company": "str", # Optional. The company name associated + with the team, if set. + "email": "str", # Optional. The email address associated + with the team. + "id": 0, # Optional. A unique identifier for the team. + "joined_organization_at": "2020-02-20 00:00:00", # Optional. + A time value given in ISO8601 combined date and time format that + represents when the team joined the organization. + "member_count": 0, # Optional. The number of members on the + team. + "name": "str", # Optional. The human-readable name for the + team. + "status": "str", # Optional. The team's membership status + within the organization. Known values are: "joined" and "pending". + "uuid": "str" # Optional. A unique universal identifier for + the team. + } + ] + } + # response body for status code(s): 403, 412 + response == { + "id": "str", # A short identifier corresponding to the HTTP status code + returned. For example, the ID for a response returning a 404 status code would + be "not_found.". Required. + "message": "str", # A message providing additional information about the + error, including details to help resolve it when possible. Required. + "request_id": "str" # Optional. Optionally, some endpoints may include a + request ID that should be provided when reporting bugs or opening support + tickets to help identify the issue. + } + """ + error_map: MutableMapping[int, Type[HttpResponseError]] = { + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + 401: cast( + Type[HttpResponseError], + lambda response: ClientAuthenticationError(response=response), + ), + 429: HttpResponseError, + 500: HttpResponseError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[JSON] = kwargs.pop("cls", None) + + _request = build_organizations_list_teams_request( + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = ( + await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 403, 412]: + if _stream: + await response.read() # Load the body in memory and close the socket + map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + raise HttpResponseError(response=response) + + response_headers = {} + if response.status_code == 200: + response_headers["ratelimit-limit"] = self._deserialize( + "int", response.headers.get("ratelimit-limit") + ) + response_headers["ratelimit-remaining"] = self._deserialize( + "int", response.headers.get("ratelimit-remaining") + ) + response_headers["ratelimit-reset"] = self._deserialize( + "int", response.headers.get("ratelimit-reset") + ) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if response.status_code == 403: + response_headers["ratelimit-limit"] = self._deserialize( + "int", response.headers.get("ratelimit-limit") + ) + response_headers["ratelimit-remaining"] = self._deserialize( + "int", response.headers.get("ratelimit-remaining") + ) + response_headers["ratelimit-reset"] = self._deserialize( + "int", response.headers.get("ratelimit-reset") + ) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if response.status_code == 412: + response_headers["ratelimit-limit"] = self._deserialize( + "int", response.headers.get("ratelimit-limit") + ) + response_headers["ratelimit-remaining"] = self._deserialize( + "int", response.headers.get("ratelimit-remaining") + ) + response_headers["ratelimit-reset"] = self._deserialize( + "int", response.headers.get("ratelimit-reset") + ) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), response_headers) # type: ignore + + return cast(JSON, deserialized) # type: ignore + + class PartnerAttachmentsOperations: """ .. warning:: @@ -178398,9 +179012,10 @@ async def assign_resources( To assign resources to a project, send a POST request to ``/v2/projects/$PROJECT_ID/resources``. - You must have both ``project:update`` and ``:read`` scopes to assign new resources. - For example, to assign a Droplet to a project, include both the ``project:update`` and - ``droplet:read`` scopes. + You must have both ``project:assign_resource`` and ``:read`` scopes to assign new + resources. For example, to assign a Droplet to a project, include both the + ``project:assign_resource`` and ``droplet:read`` scopes. The ``project:update`` scope also + grants ``project:assign_resource``. :param project_id: A unique identifier for a project. Required. :type project_id: str @@ -178472,9 +179087,10 @@ async def assign_resources( To assign resources to a project, send a POST request to ``/v2/projects/$PROJECT_ID/resources``. - You must have both ``project:update`` and ``:read`` scopes to assign new resources. - For example, to assign a Droplet to a project, include both the ``project:update`` and - ``droplet:read`` scopes. + You must have both ``project:assign_resource`` and ``:read`` scopes to assign new + resources. For example, to assign a Droplet to a project, include both the + ``project:assign_resource`` and ``droplet:read`` scopes. The ``project:update`` scope also + grants ``project:assign_resource``. :param project_id: A unique identifier for a project. Required. :type project_id: str @@ -178532,9 +179148,10 @@ async def assign_resources( To assign resources to a project, send a POST request to ``/v2/projects/$PROJECT_ID/resources``. - You must have both ``project:update`` and ``:read`` scopes to assign new resources. - For example, to assign a Droplet to a project, include both the ``project:update`` and - ``droplet:read`` scopes. + You must have both ``project:assign_resource`` and ``:read`` scopes to assign new + resources. For example, to assign a Droplet to a project, include both the + ``project:assign_resource`` and ``droplet:read`` scopes. The ``project:update`` scope also + grants ``project:assign_resource``. :param project_id: A unique identifier for a project. Required. :type project_id: str @@ -178821,9 +179438,10 @@ async def assign_resources_default( To assign resources to your default project, send a POST request to ``/v2/projects/default/resources``. - You must have both project:update and :code:``:read scopes to assign new resources. - For example, to assign a Droplet to the default project, include both the ``project:update`` - and ``droplet:read`` scopes. + You must have both ``project:assign_resource`` and ``:read`` scopes to assign new + resources. For example, to assign a Droplet to the default project, include both the + ``project:assign_resource`` and ``droplet:read`` scopes. The ``project:update`` scope also + grants ``project:assign_resource``. :param body: Required. :type body: JSON @@ -178888,9 +179506,10 @@ async def assign_resources_default( To assign resources to your default project, send a POST request to ``/v2/projects/default/resources``. - You must have both project:update and :code:``:read scopes to assign new resources. - For example, to assign a Droplet to the default project, include both the ``project:update`` - and ``droplet:read`` scopes. + You must have both ``project:assign_resource`` and ``:read`` scopes to assign new + resources. For example, to assign a Droplet to the default project, include both the + ``project:assign_resource`` and ``droplet:read`` scopes. The ``project:update`` scope also + grants ``project:assign_resource``. :param body: Required. :type body: IO[bytes] @@ -178946,9 +179565,10 @@ async def assign_resources_default( To assign resources to your default project, send a POST request to ``/v2/projects/default/resources``. - You must have both project:update and :code:``:read scopes to assign new resources. - For example, to assign a Droplet to the default project, include both the ``project:update`` - and ``droplet:read`` scopes. + You must have both ``project:assign_resource`` and ``:read`` scopes to assign new + resources. For example, to assign a Droplet to the default project, include both the + ``project:assign_resource`` and ``droplet:read`` scopes. The ``project:update`` scope also + grants ``project:assign_resource``. :param body: Is either a JSON type or a IO[bytes] type. Required. :type body: JSON or IO[bytes] @@ -192237,9 +192857,10 @@ async def list(self, *, per_page: int = 20, page: int = 1, **kwargs: Any) -> JSO of measure for the disk size. }, "type": "str" # Optional. The type of disk. - All Droplets contain a ``local`` disk. Additionally, GPU Droplets - can also have a ``scratch`` disk for non-persistent data. Known - values are: "local" and "scratch". + All Droplets contain a ``local`` or ``remote`` disk. + Additionally, GPU Droplets can also have a ``scratch`` disk for + non-persistent data. Known values are: "local", "remote", and + "scratch". } ], "gpu_info": { diff --git a/src/pydo/operations/__init__.py b/src/pydo/operations/__init__.py index 2de68fec..e3577712 100644 --- a/src/pydo/operations/__init__.py +++ b/src/pydo/operations/__init__.py @@ -31,6 +31,7 @@ from ._operations import LoadBalancersOperations from ._operations import MonitoringOperations from ._operations import NfsOperations +from ._operations import OrganizationsOperations from ._operations import PartnerAttachmentsOperations from ._operations import ProjectsOperations from ._operations import RegionsOperations @@ -90,6 +91,7 @@ "LoadBalancersOperations", "MonitoringOperations", "NfsOperations", + "OrganizationsOperations", "PartnerAttachmentsOperations", "ProjectsOperations", "RegionsOperations", diff --git a/src/pydo/operations/_operations.py b/src/pydo/operations/_operations.py index d587a331..1edc23b8 100644 --- a/src/pydo/operations/_operations.py +++ b/src/pydo/operations/_operations.py @@ -9037,6 +9037,41 @@ def build_nfs_delete_access_point_request( return HttpRequest(method="DELETE", url=_url, headers=_headers, **kwargs) +def build_organizations_create_team_request(**kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + + content_type: Optional[str] = kwargs.pop( + "content_type", _headers.pop("Content-Type", None) + ) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/v2/organizations/team" + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header( + "content_type", content_type, "str" + ) + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) + + +def build_organizations_list_teams_request(**kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/v2/organizations/teams" + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) + + def build_partner_attachments_list_request( *, per_page: int = 20, page: int = 1, **kwargs: Any ) -> HttpRequest: @@ -29207,7 +29242,7 @@ def create( }, "project_id": "str" # Optional. The ID of the project the app should be assigned to. If omitted, it will be assigned to your default project. - :code:`
`:code:`
`Requires ``project:update`` scope. + :code:`
`:code:`
`Requires ``project:assign_resource`` scope. } # response body for status code(s): 200 @@ -45930,7 +45965,7 @@ def create(self, body: Union[JSON, IO[bytes]], **kwargs: Any) -> JSON: }, "project_id": "str" # Optional. The ID of the project the app should be assigned to. If omitted, it will be assigned to your default project. - :code:`
`:code:`
`Requires ``project:update`` scope. + :code:`
`:code:`
`Requires ``project:assign_resource`` scope. } # response body for status code(s): 200 @@ -127197,8 +127232,10 @@ def list_clusters(self, *, tag_name: Optional[str] = None, **kwargs: Any) -> JSO } ], "pg_allow_replication": bool # - Optional. For Postgres clusters, set to ``true`` for a user - with replication rights. This option is not currently + Optional. For PostgreSQL clusters, set to ``true`` to grant + the user replication privileges. When omitted on create or + update, the value defaults to ``false`` and replication + privileges are not granted. This option is not currently supported for other database engines. } } @@ -127474,7 +127511,7 @@ def create_cluster( "project_id": "str", # Optional. The ID of the project that the database cluster is assigned to. If excluded when creating a new database cluster, it will be assigned to your default project.:code:`
`:code:`
`Requires - ``project:update`` scope. + ``project:assign_resource`` scope. "rules": [ { "type": "str", # The type of resource that the firewall rule @@ -127651,9 +127688,10 @@ def create_cluster( } ], "pg_allow_replication": bool # Optional. For - Postgres clusters, set to ``true`` for a user with replication - rights. This option is not currently supported for other database - engines. + PostgreSQL clusters, set to ``true`` to grant the user replication + privileges. When omitted on create or update, the value defaults to + ``false`` and replication privileges are not granted. This option is + not currently supported for other database engines. } } ], @@ -127955,9 +127993,11 @@ def create_cluster( } ], "pg_allow_replication": bool # Optional. For - Postgres clusters, set to ``true`` for a user with replication - rights. This option is not currently supported for other database - engines. + PostgreSQL clusters, set to ``true`` to grant the user + replication privileges. When omitted on create or update, the + value defaults to ``false`` and replication privileges are not + granted. This option is not currently supported for other + database engines. } } ], @@ -128328,9 +128368,11 @@ def create_cluster( } ], "pg_allow_replication": bool # Optional. For - Postgres clusters, set to ``true`` for a user with replication - rights. This option is not currently supported for other database - engines. + PostgreSQL clusters, set to ``true`` to grant the user + replication privileges. When omitted on create or update, the + value defaults to ``false`` and replication privileges are not + granted. This option is not currently supported for other + database engines. } } ], @@ -128522,7 +128564,7 @@ def create_cluster(self, body: Union[JSON, IO[bytes]], **kwargs: Any) -> JSON: "project_id": "str", # Optional. The ID of the project that the database cluster is assigned to. If excluded when creating a new database cluster, it will be assigned to your default project.:code:`
`:code:`
`Requires - ``project:update`` scope. + ``project:assign_resource`` scope. "rules": [ { "type": "str", # The type of resource that the firewall rule @@ -128699,9 +128741,10 @@ def create_cluster(self, body: Union[JSON, IO[bytes]], **kwargs: Any) -> JSON: } ], "pg_allow_replication": bool # Optional. For - Postgres clusters, set to ``true`` for a user with replication - rights. This option is not currently supported for other database - engines. + PostgreSQL clusters, set to ``true`` to grant the user replication + privileges. When omitted on create or update, the value defaults to + ``false`` and replication privileges are not granted. This option is + not currently supported for other database engines. } } ], @@ -129003,9 +129046,11 @@ def create_cluster(self, body: Union[JSON, IO[bytes]], **kwargs: Any) -> JSON: } ], "pg_allow_replication": bool # Optional. For - Postgres clusters, set to ``true`` for a user with replication - rights. This option is not currently supported for other database - engines. + PostgreSQL clusters, set to ``true`` to grant the user + replication privileges. When omitted on create or update, the + value defaults to ``false`` and replication privileges are not + granted. This option is not currently supported for other + database engines. } } ], @@ -129439,9 +129484,11 @@ def get_cluster(self, database_cluster_uuid: str, **kwargs: Any) -> JSON: } ], "pg_allow_replication": bool # Optional. For - Postgres clusters, set to ``true`` for a user with replication - rights. This option is not currently supported for other database - engines. + PostgreSQL clusters, set to ``true`` to grant the user + replication privileges. When omitted on create or update, the + value defaults to ``false`` and replication privileges are not + granted. This option is not currently supported for other + database engines. } } ], @@ -131249,10 +131296,11 @@ def update_firewall_rules( resources should be able to open connections to the database. You may limit connections to specific Droplets, Kubernetes clusters, or IP addresses. When a tag is provided, any Droplet or Kubernetes node with that tag applied to it will have access. The firewall is limited to 100 - rules (or trusted sources). When possible, we recommend `placing your databases into a VPC - network `_ to limit access to them - instead of using a firewall. - A successful. + rules (or trusted sources). You cannot add IPv6 addresses as trusted sources. For additional + limits, see your database engine's limits page. When possible, we recommend `placing your + databases into a VPC network `_ to + limit access to them instead of using a firewall. + A successful request returns a 204 status code with no content. :param database_cluster_uuid: A unique identifier for a database cluster. Required. :type database_cluster_uuid: str @@ -131321,10 +131369,11 @@ def update_firewall_rules( resources should be able to open connections to the database. You may limit connections to specific Droplets, Kubernetes clusters, or IP addresses. When a tag is provided, any Droplet or Kubernetes node with that tag applied to it will have access. The firewall is limited to 100 - rules (or trusted sources). When possible, we recommend `placing your databases into a VPC - network `_ to limit access to them - instead of using a firewall. - A successful. + rules (or trusted sources). You cannot add IPv6 addresses as trusted sources. For additional + limits, see your database engine's limits page. When possible, we recommend `placing your + databases into a VPC network `_ to + limit access to them instead of using a firewall. + A successful request returns a 204 status code with no content. :param database_cluster_uuid: A unique identifier for a database cluster. Required. :type database_cluster_uuid: str @@ -131365,10 +131414,11 @@ def update_firewall_rules( resources should be able to open connections to the database. You may limit connections to specific Droplets, Kubernetes clusters, or IP addresses. When a tag is provided, any Droplet or Kubernetes node with that tag applied to it will have access. The firewall is limited to 100 - rules (or trusted sources). When possible, we recommend `placing your databases into a VPC - network `_ to limit access to them - instead of using a firewall. - A successful. + rules (or trusted sources). You cannot add IPv6 addresses as trusted sources. For additional + limits, see your database engine's limits page. When possible, we recommend `placing your + databases into a VPC network `_ to + limit access to them instead of using a firewall. + A successful request returns a 204 status code with no content. :param database_cluster_uuid: A unique identifier for a database cluster. Required. :type database_cluster_uuid: str @@ -133781,6 +133831,11 @@ def list_users(self, database_cluster_uuid: str, **kwargs: Any) -> JSON: For MySQL clusters, additional options will be contained in the mysql_settings object. + For PostgreSQL clusters, additional options will be contained in the ``settings`` + object (for example, ``pg_allow_replication``\\ ). + + For Kafka clusters, additional options will be contained in the ``settings`` object. + For MongoDB clusters, additional information will be contained in the mongo_user_settings object. @@ -133871,9 +133926,10 @@ def list_users(self, database_cluster_uuid: str, **kwargs: Any) -> JSON: } ], "pg_allow_replication": bool # Optional. For - Postgres clusters, set to ``true`` for a user with replication - rights. This option is not currently supported for other database - engines. + PostgreSQL clusters, set to ``true`` to grant the user replication + privileges. When omitted on create or update, the value defaults to + ``false`` and replication privileges are not granted. This option is + not currently supported for other database engines. } } ] @@ -133988,10 +134044,14 @@ def add_user( When adding a user to a MySQL cluster, additional options can be configured in the ``mysql_settings`` object. + When adding a user to a PostgreSQL cluster, additional options can be configured in + the ``settings`` object (for example, ``pg_allow_replication``\\ ). When + ``pg_allow_replication`` is omitted, it defaults to ``false``. + When adding a user to a Kafka cluster, additional options can be configured in the ``settings`` object. - When adding a user to a MongoDB cluster, additional options can be configured in + When adding a user to a MongoDB cluster, additional options can be configured in the ``settings.mongo_user_settings`` object. The response will be a JSON object with a key called ``user``. The value of this will be an @@ -134083,9 +134143,11 @@ def add_user( values are: "deny", "admin", "read", "readwrite", and "write". } ], - "pg_allow_replication": bool # Optional. For Postgres clusters, set - to ``true`` for a user with replication rights. This option is not currently - supported for other database engines. + "pg_allow_replication": bool # Optional. For PostgreSQL clusters, + set to ``true`` to grant the user replication privileges. When omitted on + create or update, the value defaults to ``false`` and replication privileges + are not granted. This option is not currently supported for other database + engines. } } @@ -134160,9 +134222,11 @@ def add_user( "readwrite", and "write". } ], - "pg_allow_replication": bool # Optional. For Postgres - clusters, set to ``true`` for a user with replication rights. This option - is not currently supported for other database engines. + "pg_allow_replication": bool # Optional. For PostgreSQL + clusters, set to ``true`` to grant the user replication privileges. When + omitted on create or update, the value defaults to ``false`` and + replication privileges are not granted. This option is not currently + supported for other database engines. } } } @@ -134199,10 +134263,14 @@ def add_user( When adding a user to a MySQL cluster, additional options can be configured in the ``mysql_settings`` object. + When adding a user to a PostgreSQL cluster, additional options can be configured in + the ``settings`` object (for example, ``pg_allow_replication``\\ ). When + ``pg_allow_replication`` is omitted, it defaults to ``false``. + When adding a user to a Kafka cluster, additional options can be configured in the ``settings`` object. - When adding a user to a MongoDB cluster, additional options can be configured in + When adding a user to a MongoDB cluster, additional options can be configured in the ``settings.mongo_user_settings`` object. The response will be a JSON object with a key called ``user``. The value of this will be an @@ -134294,9 +134362,11 @@ def add_user( "readwrite", and "write". } ], - "pg_allow_replication": bool # Optional. For Postgres - clusters, set to ``true`` for a user with replication rights. This option - is not currently supported for other database engines. + "pg_allow_replication": bool # Optional. For PostgreSQL + clusters, set to ``true`` to grant the user replication privileges. When + omitted on create or update, the value defaults to ``false`` and + replication privileges are not granted. This option is not currently + supported for other database engines. } } } @@ -134328,10 +134398,14 @@ def add_user( When adding a user to a MySQL cluster, additional options can be configured in the ``mysql_settings`` object. + When adding a user to a PostgreSQL cluster, additional options can be configured in + the ``settings`` object (for example, ``pg_allow_replication``\\ ). When + ``pg_allow_replication`` is omitted, it defaults to ``false``. + When adding a user to a Kafka cluster, additional options can be configured in the ``settings`` object. - When adding a user to a MongoDB cluster, additional options can be configured in + When adding a user to a MongoDB cluster, additional options can be configured in the ``settings.mongo_user_settings`` object. The response will be a JSON object with a key called ``user``. The value of this will be an @@ -134420,9 +134494,11 @@ def add_user( values are: "deny", "admin", "read", "readwrite", and "write". } ], - "pg_allow_replication": bool # Optional. For Postgres clusters, set - to ``true`` for a user with replication rights. This option is not currently - supported for other database engines. + "pg_allow_replication": bool # Optional. For PostgreSQL clusters, + set to ``true`` to grant the user replication privileges. When omitted on + create or update, the value defaults to ``false`` and replication privileges + are not granted. This option is not currently supported for other database + engines. } } @@ -134497,9 +134573,11 @@ def add_user( "readwrite", and "write". } ], - "pg_allow_replication": bool # Optional. For Postgres - clusters, set to ``true`` for a user with replication rights. This option - is not currently supported for other database engines. + "pg_allow_replication": bool # Optional. For PostgreSQL + clusters, set to ``true`` to grant the user replication privileges. When + omitted on create or update, the value defaults to ``false`` and + replication privileges are not granted. This option is not currently + supported for other database engines. } } } @@ -134626,6 +134704,9 @@ def get_user( For MySQL clusters, additional options will be contained in the ``mysql_settings`` object. + For PostgreSQL clusters, additional options will be contained in the ``settings`` + object (for example, ``pg_allow_replication``\\ ). + For Kafka clusters, additional options will be contained in the ``settings`` object. For MongoDB clusters, additional information will be contained in the mongo_user_settings @@ -134713,9 +134794,11 @@ def get_user( "readwrite", and "write". } ], - "pg_allow_replication": bool # Optional. For Postgres - clusters, set to ``true`` for a user with replication rights. This option - is not currently supported for other database engines. + "pg_allow_replication": bool # Optional. For PostgreSQL + clusters, set to ``true`` to grant the user replication privileges. When + omitted on create or update, the value defaults to ``false`` and + replication privileges are not granted. This option is not currently + supported for other database engines. } } } @@ -134944,8 +135027,14 @@ def update_user( the name of a user, you must recreate a new user. + For PostgreSQL clusters, you can update ``settings.pg_allow_replication`` to enable or + disable replication privileges for the user. When omitted, the value defaults to ``false``. + + For Kafka and OpenSearch clusters, additional options can be configured in the + ``settings`` object (for example, topic or index ACLs). + The response will be a JSON object with a key called ``user``. The value of this will be an - object that contains the name of the update database user, along with the ``settings`` object + object that contains the name of the updated database user, along with the ``settings`` object that has been updated. @@ -135014,9 +135103,11 @@ def update_user( values are: "deny", "admin", "read", "readwrite", and "write". } ], - "pg_allow_replication": bool # Optional. For Postgres clusters, set - to ``true`` for a user with replication rights. This option is not currently - supported for other database engines. + "pg_allow_replication": bool # Optional. For PostgreSQL clusters, + set to ``true`` to grant the user replication privileges. When omitted on + create or update, the value defaults to ``false`` and replication privileges + are not granted. This option is not currently supported for other database + engines. } } @@ -135091,9 +135182,11 @@ def update_user( "readwrite", and "write". } ], - "pg_allow_replication": bool # Optional. For Postgres - clusters, set to ``true`` for a user with replication rights. This option - is not currently supported for other database engines. + "pg_allow_replication": bool # Optional. For PostgreSQL + clusters, set to ``true`` to grant the user replication privileges. When + omitted on create or update, the value defaults to ``false`` and + replication privileges are not granted. This option is not currently + supported for other database engines. } } } @@ -135131,8 +135224,14 @@ def update_user( the name of a user, you must recreate a new user. + For PostgreSQL clusters, you can update ``settings.pg_allow_replication`` to enable or + disable replication privileges for the user. When omitted, the value defaults to ``false``. + + For Kafka and OpenSearch clusters, additional options can be configured in the + ``settings`` object (for example, topic or index ACLs). + The response will be a JSON object with a key called ``user``. The value of this will be an - object that contains the name of the update database user, along with the ``settings`` object + object that contains the name of the updated database user, along with the ``settings`` object that has been updated. @@ -135223,9 +135322,11 @@ def update_user( "readwrite", and "write". } ], - "pg_allow_replication": bool # Optional. For Postgres - clusters, set to ``true`` for a user with replication rights. This option - is not currently supported for other database engines. + "pg_allow_replication": bool # Optional. For PostgreSQL + clusters, set to ``true`` to grant the user replication privileges. When + omitted on create or update, the value defaults to ``false`` and + replication privileges are not granted. This option is not currently + supported for other database engines. } } } @@ -135261,8 +135362,14 @@ def update_user( the name of a user, you must recreate a new user. + For PostgreSQL clusters, you can update ``settings.pg_allow_replication`` to enable or + disable replication privileges for the user. When omitted, the value defaults to ``false``. + + For Kafka and OpenSearch clusters, additional options can be configured in the + ``settings`` object (for example, topic or index ACLs). + The response will be a JSON object with a key called ``user``. The value of this will be an - object that contains the name of the update database user, along with the ``settings`` object + object that contains the name of the updated database user, along with the ``settings`` object that has been updated. @@ -135328,9 +135435,11 @@ def update_user( values are: "deny", "admin", "read", "readwrite", and "write". } ], - "pg_allow_replication": bool # Optional. For Postgres clusters, set - to ``true`` for a user with replication rights. This option is not currently - supported for other database engines. + "pg_allow_replication": bool # Optional. For PostgreSQL clusters, + set to ``true`` to grant the user replication privileges. When omitted on + create or update, the value defaults to ``false`` and replication privileges + are not granted. This option is not currently supported for other database + engines. } } @@ -135405,9 +135514,11 @@ def update_user( "readwrite", and "write". } ], - "pg_allow_replication": bool # Optional. For Postgres - clusters, set to ``true`` for a user with replication rights. This option - is not currently supported for other database engines. + "pg_allow_replication": bool # Optional. For PostgreSQL + clusters, set to ``true`` to grant the user replication privileges. When + omitted on create or update, the value defaults to ``false`` and + replication privileges are not granted. This option is not currently + supported for other database engines. } } } @@ -135638,9 +135749,11 @@ def reset_auth( "readwrite", and "write". } ], - "pg_allow_replication": bool # Optional. For Postgres - clusters, set to ``true`` for a user with replication rights. This option - is not currently supported for other database engines. + "pg_allow_replication": bool # Optional. For PostgreSQL + clusters, set to ``true`` to grant the user replication privileges. When + omitted on create or update, the value defaults to ``false`` and + replication privileges are not granted. This option is not currently + supported for other database engines. } } } @@ -135767,9 +135880,11 @@ def reset_auth( "readwrite", and "write". } ], - "pg_allow_replication": bool # Optional. For Postgres - clusters, set to ``true`` for a user with replication rights. This option - is not currently supported for other database engines. + "pg_allow_replication": bool # Optional. For PostgreSQL + clusters, set to ``true`` to grant the user replication privileges. When + omitted on create or update, the value defaults to ``false`` and + replication privileges are not granted. This option is not currently + supported for other database engines. } } } @@ -135903,9 +136018,11 @@ def reset_auth( "readwrite", and "write". } ], - "pg_allow_replication": bool # Optional. For Postgres - clusters, set to ``true`` for a user with replication rights. This option - is not currently supported for other database engines. + "pg_allow_replication": bool # Optional. For PostgreSQL + clusters, set to ``true`` to grant the user replication privileges. When + omitted on create or update, the value defaults to ``false`` and + replication privileges are not granted. This option is not currently + supported for other database engines. } } } @@ -149457,9 +149574,10 @@ class of Droplets created from this size. For example: Basic, General The unit of measure for the disk size. }, "type": "str" # Optional. The type - of disk. All Droplets contain a ``local`` disk. Additionally, - GPU Droplets can also have a ``scratch`` disk for - non-persistent data. Known values are: "local" and "scratch". + of disk. All Droplets contain a ``local`` or ``remote`` disk. + Additionally, GPU Droplets can also have a ``scratch`` disk + for non-persistent data. Known values are: "local", "remote", + and "scratch". } ], "gpu_info": { @@ -149504,9 +149622,10 @@ class of Droplets created from this size. For example: Basic, General of measure for the disk size. }, "type": "str" # Optional. The type of disk. - All Droplets contain a ``local`` disk. Additionally, GPU Droplets - can also have a ``scratch`` disk for non-persistent data. Known - values are: "local" and "scratch". + All Droplets contain a ``local`` or ``remote`` disk. + Additionally, GPU Droplets can also have a ``scratch`` disk for + non-persistent data. Known values are: "local", "remote", and + "scratch". } ], "gpu_info": { @@ -150130,9 +150249,10 @@ def get(self, droplet_id: int, **kwargs: Any) -> JSON: of measure for the disk size. }, "type": "str" # Optional. The type of disk. - All Droplets contain a ``local`` disk. Additionally, GPU Droplets - can also have a ``scratch`` disk for non-persistent data. Known - values are: "local" and "scratch". + All Droplets contain a ``local`` or ``remote`` disk. + Additionally, GPU Droplets can also have a ``scratch`` disk for + non-persistent data. Known values are: "local", "remote", and + "scratch". } ], "gpu_info": { @@ -150175,9 +150295,9 @@ def get(self, droplet_id: int, **kwargs: Any) -> JSON: measure for the disk size. }, "type": "str" # Optional. The type of disk. All - Droplets contain a ``local`` disk. Additionally, GPU Droplets can - also have a ``scratch`` disk for non-persistent data. Known values - are: "local" and "scratch". + Droplets contain a ``local`` or ``remote`` disk. Additionally, GPU + Droplets can also have a ``scratch`` disk for non-persistent data. + Known values are: "local", "remote", and "scratch". } ], "gpu_info": { @@ -151703,9 +151823,10 @@ class of Droplets created from this size. For example: Basic, General The unit of measure for the disk size. }, "type": "str" # Optional. The type - of disk. All Droplets contain a ``local`` disk. Additionally, - GPU Droplets can also have a ``scratch`` disk for - non-persistent data. Known values are: "local" and "scratch". + of disk. All Droplets contain a ``local`` or ``remote`` disk. + Additionally, GPU Droplets can also have a ``scratch`` disk + for non-persistent data. Known values are: "local", "remote", + and "scratch". } ], "gpu_info": { @@ -151750,9 +151871,10 @@ class of Droplets created from this size. For example: Basic, General of measure for the disk size. }, "type": "str" # Optional. The type of disk. - All Droplets contain a ``local`` disk. Additionally, GPU Droplets - can also have a ``scratch`` disk for non-persistent data. Known - values are: "local" and "scratch". + All Droplets contain a ``local`` or ``remote`` disk. + Additionally, GPU Droplets can also have a ``scratch`` disk for + non-persistent data. Known values are: "local", "remote", and + "scratch". } ], "gpu_info": { @@ -165915,6 +166037,10 @@ def list_clusters( "enabled": bool # Optional. Indicates whether the Nvidia GPU Device Plugin is enabled. }, + "p2p_oci_registry_plugin": { + "enabled": bool # Optional. Indicates whether the + Peer-to-peer OCI registry component is enabled. + }, "rdma_shared_dev_plugin": { "enabled": bool # Optional. Indicates whether the RDMA shared device plugin is enabled. @@ -166227,6 +166353,10 @@ def create_cluster( "enabled": bool # Optional. Indicates whether the Nvidia GPU Device Plugin is enabled. }, + "p2p_oci_registry_plugin": { + "enabled": bool # Optional. Indicates whether the Peer-to-peer OCI + registry component is enabled. + }, "rdma_shared_dev_plugin": { "enabled": bool # Optional. Indicates whether the RDMA shared device plugin is enabled. @@ -166446,6 +166576,10 @@ def create_cluster( "enabled": bool # Optional. Indicates whether the Nvidia GPU Device Plugin is enabled. }, + "p2p_oci_registry_plugin": { + "enabled": bool # Optional. Indicates whether the + Peer-to-peer OCI registry component is enabled. + }, "rdma_shared_dev_plugin": { "enabled": bool # Optional. Indicates whether the RDMA shared device plugin is enabled. @@ -166698,6 +166832,10 @@ def create_cluster( "enabled": bool # Optional. Indicates whether the Nvidia GPU Device Plugin is enabled. }, + "p2p_oci_registry_plugin": { + "enabled": bool # Optional. Indicates whether the + Peer-to-peer OCI registry component is enabled. + }, "rdma_shared_dev_plugin": { "enabled": bool # Optional. Indicates whether the RDMA shared device plugin is enabled. @@ -166936,6 +167074,10 @@ def create_cluster(self, body: Union[JSON, IO[bytes]], **kwargs: Any) -> JSON: "enabled": bool # Optional. Indicates whether the Nvidia GPU Device Plugin is enabled. }, + "p2p_oci_registry_plugin": { + "enabled": bool # Optional. Indicates whether the Peer-to-peer OCI + registry component is enabled. + }, "rdma_shared_dev_plugin": { "enabled": bool # Optional. Indicates whether the RDMA shared device plugin is enabled. @@ -167155,6 +167297,10 @@ def create_cluster(self, body: Union[JSON, IO[bytes]], **kwargs: Any) -> JSON: "enabled": bool # Optional. Indicates whether the Nvidia GPU Device Plugin is enabled. }, + "p2p_oci_registry_plugin": { + "enabled": bool # Optional. Indicates whether the + Peer-to-peer OCI registry component is enabled. + }, "rdma_shared_dev_plugin": { "enabled": bool # Optional. Indicates whether the RDMA shared device plugin is enabled. @@ -167468,6 +167614,10 @@ def get_cluster(self, cluster_id: str, **kwargs: Any) -> JSON: "enabled": bool # Optional. Indicates whether the Nvidia GPU Device Plugin is enabled. }, + "p2p_oci_registry_plugin": { + "enabled": bool # Optional. Indicates whether the + Peer-to-peer OCI registry component is enabled. + }, "rdma_shared_dev_plugin": { "enabled": bool # Optional. Indicates whether the RDMA shared device plugin is enabled. @@ -167710,6 +167860,10 @@ def update_cluster( "enabled": bool # Optional. Indicates whether the Nvidia GPU Device Plugin is enabled. }, + "p2p_oci_registry_plugin": { + "enabled": bool # Optional. Indicates whether the Peer-to-peer OCI + registry component is enabled. + }, "rdma_shared_dev_plugin": { "enabled": bool # Optional. Indicates whether the RDMA shared device plugin is enabled. @@ -167906,6 +168060,10 @@ def update_cluster( "enabled": bool # Optional. Indicates whether the Nvidia GPU Device Plugin is enabled. }, + "p2p_oci_registry_plugin": { + "enabled": bool # Optional. Indicates whether the + Peer-to-peer OCI registry component is enabled. + }, "rdma_shared_dev_plugin": { "enabled": bool # Optional. Indicates whether the RDMA shared device plugin is enabled. @@ -168170,6 +168328,10 @@ def update_cluster( "enabled": bool # Optional. Indicates whether the Nvidia GPU Device Plugin is enabled. }, + "p2p_oci_registry_plugin": { + "enabled": bool # Optional. Indicates whether the + Peer-to-peer OCI registry component is enabled. + }, "rdma_shared_dev_plugin": { "enabled": bool # Optional. Indicates whether the RDMA shared device plugin is enabled. @@ -168327,6 +168489,10 @@ def update_cluster( "enabled": bool # Optional. Indicates whether the Nvidia GPU Device Plugin is enabled. }, + "p2p_oci_registry_plugin": { + "enabled": bool # Optional. Indicates whether the Peer-to-peer OCI + registry component is enabled. + }, "rdma_shared_dev_plugin": { "enabled": bool # Optional. Indicates whether the RDMA shared device plugin is enabled. @@ -168523,6 +168689,10 @@ def update_cluster( "enabled": bool # Optional. Indicates whether the Nvidia GPU Device Plugin is enabled. }, + "p2p_oci_registry_plugin": { + "enabled": bool # Optional. Indicates whether the + Peer-to-peer OCI registry component is enabled. + }, "rdma_shared_dev_plugin": { "enabled": bool # Optional. Indicates whether the RDMA shared device plugin is enabled. @@ -190109,6 +190279,483 @@ def delete_access_point(self, access_point_id: str, **kwargs: Any) -> JSON: return cast(JSON, deserialized) # type: ignore +class OrganizationsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~pydo.GeneratedClient`'s + :attr:`organizations` attribute. + """ + + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = ( + input_args.pop(0) if input_args else kwargs.pop("deserializer") + ) + + @overload + def create_team( + self, body: JSON, *, content_type: str = "application/json", **kwargs: Any + ) -> JSON: + # pylint: disable=line-too-long + """Create a Team in an Organization. + + To create a new team within an organization, send a POST request to + ``/v2/organizations/team``. + + This endpoint must be called in an organization context. Optionally include + ``invitations`` to invite users to the new team. The ``owner`` role cannot be + assigned via invitation. + + :param body: Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: JSON object + :rtype: JSON + :raises ~azure.core.exceptions.HttpResponseError: + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + body = { + "name": "str", # The human-readable name for the team to create. Required. + "invitations": [ + { + "email": "str", # The email address of the user to invite. + Required. + "role": "str" # The role to assign to the invited user. The + ``owner`` role cannot be assigned via invitation. Required. Known values + are: "member", "biller", "billing viewer", "resource viewer", and + "modifier". + } + ] + } + + # response body for status code(s): 201 + response == { + "team": { + "name": "str", # The human-readable name for the newly created team. + Required. + "uuid": "str" # A unique universal identifier for the newly created + team. Required. + }, + "invitations": { + "str": { + "status": "str" # Optional. The invitation delivery status + for the email address. Known values are: "ok" and + "daily_invite_limit_reached". + } + } + } + # response body for status code(s): 400, 403, 412 + response == { + "id": "str", # A short identifier corresponding to the HTTP status code + returned. For example, the ID for a response returning a 404 status code would + be "not_found.". Required. + "message": "str", # A message providing additional information about the + error, including details to help resolve it when possible. Required. + "request_id": "str" # Optional. Optionally, some endpoints may include a + request ID that should be provided when reporting bugs or opening support + tickets to help identify the issue. + } + """ + + @overload + def create_team( + self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any + ) -> JSON: + # pylint: disable=line-too-long + """Create a Team in an Organization. + + To create a new team within an organization, send a POST request to + ``/v2/organizations/team``. + + This endpoint must be called in an organization context. Optionally include + ``invitations`` to invite users to the new team. The ``owner`` role cannot be + assigned via invitation. + + :param body: Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: JSON object + :rtype: JSON + :raises ~azure.core.exceptions.HttpResponseError: + + Example: + .. code-block:: python + + # response body for status code(s): 201 + response == { + "team": { + "name": "str", # The human-readable name for the newly created team. + Required. + "uuid": "str" # A unique universal identifier for the newly created + team. Required. + }, + "invitations": { + "str": { + "status": "str" # Optional. The invitation delivery status + for the email address. Known values are: "ok" and + "daily_invite_limit_reached". + } + } + } + # response body for status code(s): 400, 403, 412 + response == { + "id": "str", # A short identifier corresponding to the HTTP status code + returned. For example, the ID for a response returning a 404 status code would + be "not_found.". Required. + "message": "str", # A message providing additional information about the + error, including details to help resolve it when possible. Required. + "request_id": "str" # Optional. Optionally, some endpoints may include a + request ID that should be provided when reporting bugs or opening support + tickets to help identify the issue. + } + """ + + @distributed_trace + def create_team(self, body: Union[JSON, IO[bytes]], **kwargs: Any) -> JSON: + # pylint: disable=line-too-long + """Create a Team in an Organization. + + To create a new team within an organization, send a POST request to + ``/v2/organizations/team``. + + This endpoint must be called in an organization context. Optionally include + ``invitations`` to invite users to the new team. The ``owner`` role cannot be + assigned via invitation. + + :param body: Is either a JSON type or a IO[bytes] type. Required. + :type body: JSON or IO[bytes] + :return: JSON object + :rtype: JSON + :raises ~azure.core.exceptions.HttpResponseError: + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + body = { + "name": "str", # The human-readable name for the team to create. Required. + "invitations": [ + { + "email": "str", # The email address of the user to invite. + Required. + "role": "str" # The role to assign to the invited user. The + ``owner`` role cannot be assigned via invitation. Required. Known values + are: "member", "biller", "billing viewer", "resource viewer", and + "modifier". + } + ] + } + + # response body for status code(s): 201 + response == { + "team": { + "name": "str", # The human-readable name for the newly created team. + Required. + "uuid": "str" # A unique universal identifier for the newly created + team. Required. + }, + "invitations": { + "str": { + "status": "str" # Optional. The invitation delivery status + for the email address. Known values are: "ok" and + "daily_invite_limit_reached". + } + } + } + # response body for status code(s): 400, 403, 412 + response == { + "id": "str", # A short identifier corresponding to the HTTP status code + returned. For example, the ID for a response returning a 404 status code would + be "not_found.". Required. + "message": "str", # A message providing additional information about the + error, including details to help resolve it when possible. Required. + "request_id": "str" # Optional. Optionally, some endpoints may include a + request ID that should be provided when reporting bugs or opening support + tickets to help identify the issue. + } + """ + error_map: MutableMapping[int, Type[HttpResponseError]] = { + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + 401: cast( + Type[HttpResponseError], + lambda response: ClientAuthenticationError(response=response), + ), + 429: HttpResponseError, + 500: HttpResponseError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop( + "content_type", _headers.pop("Content-Type", None) + ) + cls: ClsType[JSON] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _json = body + + _request = build_organizations_create_team_request( + content_type=content_type, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = ( + self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + ) + + response = pipeline_response.http_response + + if response.status_code not in [201, 400, 403, 412]: + if _stream: + response.read() # Load the body in memory and close the socket + map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + raise HttpResponseError(response=response) + + response_headers = {} + if response.status_code == 201: + response_headers["ratelimit-limit"] = self._deserialize( + "int", response.headers.get("ratelimit-limit") + ) + response_headers["ratelimit-remaining"] = self._deserialize( + "int", response.headers.get("ratelimit-remaining") + ) + response_headers["ratelimit-reset"] = self._deserialize( + "int", response.headers.get("ratelimit-reset") + ) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if response.status_code == 400: + response_headers["ratelimit-limit"] = self._deserialize( + "int", response.headers.get("ratelimit-limit") + ) + response_headers["ratelimit-remaining"] = self._deserialize( + "int", response.headers.get("ratelimit-remaining") + ) + response_headers["ratelimit-reset"] = self._deserialize( + "int", response.headers.get("ratelimit-reset") + ) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if response.status_code == 403: + response_headers["ratelimit-limit"] = self._deserialize( + "int", response.headers.get("ratelimit-limit") + ) + response_headers["ratelimit-remaining"] = self._deserialize( + "int", response.headers.get("ratelimit-remaining") + ) + response_headers["ratelimit-reset"] = self._deserialize( + "int", response.headers.get("ratelimit-reset") + ) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if response.status_code == 412: + response_headers["ratelimit-limit"] = self._deserialize( + "int", response.headers.get("ratelimit-limit") + ) + response_headers["ratelimit-remaining"] = self._deserialize( + "int", response.headers.get("ratelimit-remaining") + ) + response_headers["ratelimit-reset"] = self._deserialize( + "int", response.headers.get("ratelimit-reset") + ) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), response_headers) # type: ignore + + return cast(JSON, deserialized) # type: ignore + + @distributed_trace + def list_teams(self, **kwargs: Any) -> JSON: + # pylint: disable=line-too-long + """List Teams in an Organization. + + To list all teams in an organization, send a GET request to + ``/v2/organizations/teams``. + + This endpoint must be called in an organization context. + + :return: JSON object + :rtype: JSON + :raises ~azure.core.exceptions.HttpResponseError: + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response == { + "teams": [ + { + "company": "str", # Optional. The company name associated + with the team, if set. + "email": "str", # Optional. The email address associated + with the team. + "id": 0, # Optional. A unique identifier for the team. + "joined_organization_at": "2020-02-20 00:00:00", # Optional. + A time value given in ISO8601 combined date and time format that + represents when the team joined the organization. + "member_count": 0, # Optional. The number of members on the + team. + "name": "str", # Optional. The human-readable name for the + team. + "status": "str", # Optional. The team's membership status + within the organization. Known values are: "joined" and "pending". + "uuid": "str" # Optional. A unique universal identifier for + the team. + } + ] + } + # response body for status code(s): 403, 412 + response == { + "id": "str", # A short identifier corresponding to the HTTP status code + returned. For example, the ID for a response returning a 404 status code would + be "not_found.". Required. + "message": "str", # A message providing additional information about the + error, including details to help resolve it when possible. Required. + "request_id": "str" # Optional. Optionally, some endpoints may include a + request ID that should be provided when reporting bugs or opening support + tickets to help identify the issue. + } + """ + error_map: MutableMapping[int, Type[HttpResponseError]] = { + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + 401: cast( + Type[HttpResponseError], + lambda response: ClientAuthenticationError(response=response), + ), + 429: HttpResponseError, + 500: HttpResponseError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[JSON] = kwargs.pop("cls", None) + + _request = build_organizations_list_teams_request( + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = ( + self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 403, 412]: + if _stream: + response.read() # Load the body in memory and close the socket + map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + raise HttpResponseError(response=response) + + response_headers = {} + if response.status_code == 200: + response_headers["ratelimit-limit"] = self._deserialize( + "int", response.headers.get("ratelimit-limit") + ) + response_headers["ratelimit-remaining"] = self._deserialize( + "int", response.headers.get("ratelimit-remaining") + ) + response_headers["ratelimit-reset"] = self._deserialize( + "int", response.headers.get("ratelimit-reset") + ) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if response.status_code == 403: + response_headers["ratelimit-limit"] = self._deserialize( + "int", response.headers.get("ratelimit-limit") + ) + response_headers["ratelimit-remaining"] = self._deserialize( + "int", response.headers.get("ratelimit-remaining") + ) + response_headers["ratelimit-reset"] = self._deserialize( + "int", response.headers.get("ratelimit-reset") + ) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if response.status_code == 412: + response_headers["ratelimit-limit"] = self._deserialize( + "int", response.headers.get("ratelimit-limit") + ) + response_headers["ratelimit-remaining"] = self._deserialize( + "int", response.headers.get("ratelimit-remaining") + ) + response_headers["ratelimit-reset"] = self._deserialize( + "int", response.headers.get("ratelimit-reset") + ) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), response_headers) # type: ignore + + return cast(JSON, deserialized) # type: ignore + + class PartnerAttachmentsOperations: """ .. warning:: @@ -194111,9 +194758,10 @@ def assign_resources( To assign resources to a project, send a POST request to ``/v2/projects/$PROJECT_ID/resources``. - You must have both ``project:update`` and ``:read`` scopes to assign new resources. - For example, to assign a Droplet to a project, include both the ``project:update`` and - ``droplet:read`` scopes. + You must have both ``project:assign_resource`` and ``:read`` scopes to assign new + resources. For example, to assign a Droplet to a project, include both the + ``project:assign_resource`` and ``droplet:read`` scopes. The ``project:update`` scope also + grants ``project:assign_resource``. :param project_id: A unique identifier for a project. Required. :type project_id: str @@ -194185,9 +194833,10 @@ def assign_resources( To assign resources to a project, send a POST request to ``/v2/projects/$PROJECT_ID/resources``. - You must have both ``project:update`` and ``:read`` scopes to assign new resources. - For example, to assign a Droplet to a project, include both the ``project:update`` and - ``droplet:read`` scopes. + You must have both ``project:assign_resource`` and ``:read`` scopes to assign new + resources. For example, to assign a Droplet to a project, include both the + ``project:assign_resource`` and ``droplet:read`` scopes. The ``project:update`` scope also + grants ``project:assign_resource``. :param project_id: A unique identifier for a project. Required. :type project_id: str @@ -194245,9 +194894,10 @@ def assign_resources( To assign resources to a project, send a POST request to ``/v2/projects/$PROJECT_ID/resources``. - You must have both ``project:update`` and ``:read`` scopes to assign new resources. - For example, to assign a Droplet to a project, include both the ``project:update`` and - ``droplet:read`` scopes. + You must have both ``project:assign_resource`` and ``:read`` scopes to assign new + resources. For example, to assign a Droplet to a project, include both the + ``project:assign_resource`` and ``droplet:read`` scopes. The ``project:update`` scope also + grants ``project:assign_resource``. :param project_id: A unique identifier for a project. Required. :type project_id: str @@ -194534,9 +195184,10 @@ def assign_resources_default( To assign resources to your default project, send a POST request to ``/v2/projects/default/resources``. - You must have both project:update and :code:``:read scopes to assign new resources. - For example, to assign a Droplet to the default project, include both the ``project:update`` - and ``droplet:read`` scopes. + You must have both ``project:assign_resource`` and ``:read`` scopes to assign new + resources. For example, to assign a Droplet to the default project, include both the + ``project:assign_resource`` and ``droplet:read`` scopes. The ``project:update`` scope also + grants ``project:assign_resource``. :param body: Required. :type body: JSON @@ -194601,9 +195252,10 @@ def assign_resources_default( To assign resources to your default project, send a POST request to ``/v2/projects/default/resources``. - You must have both project:update and :code:``:read scopes to assign new resources. - For example, to assign a Droplet to the default project, include both the ``project:update`` - and ``droplet:read`` scopes. + You must have both ``project:assign_resource`` and ``:read`` scopes to assign new + resources. For example, to assign a Droplet to the default project, include both the + ``project:assign_resource`` and ``droplet:read`` scopes. The ``project:update`` scope also + grants ``project:assign_resource``. :param body: Required. :type body: IO[bytes] @@ -194659,9 +195311,10 @@ def assign_resources_default( To assign resources to your default project, send a POST request to ``/v2/projects/default/resources``. - You must have both project:update and :code:``:read scopes to assign new resources. - For example, to assign a Droplet to the default project, include both the ``project:update`` - and ``droplet:read`` scopes. + You must have both ``project:assign_resource`` and ``:read`` scopes to assign new + resources. For example, to assign a Droplet to the default project, include both the + ``project:assign_resource`` and ``droplet:read`` scopes. The ``project:update`` scope also + grants ``project:assign_resource``. :param body: Is either a JSON type or a IO[bytes] type. Required. :type body: JSON or IO[bytes] @@ -207942,9 +208595,10 @@ def list(self, *, per_page: int = 20, page: int = 1, **kwargs: Any) -> JSON: of measure for the disk size. }, "type": "str" # Optional. The type of disk. - All Droplets contain a ``local`` disk. Additionally, GPU Droplets - can also have a ``scratch`` disk for non-persistent data. Known - values are: "local" and "scratch". + All Droplets contain a ``local`` or ``remote`` disk. + Additionally, GPU Droplets can also have a ``scratch`` disk for + non-persistent data. Known values are: "local", "remote", and + "scratch". } ], "gpu_info": {