ClustersOperations Class
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
CosmosdbForPostgresqlMgmtClient's
<xref:clusters> attribute.
Constructor
ClustersOperations(*args, **kwargs)
Methods
| begin_create |
Creates a new cluster with servers. |
| begin_delete |
Deletes a cluster together with servers in it. |
| begin_promote_read_replica |
Promotes read replica cluster to an independent read-write cluster. |
| begin_restart |
Restarts all nodes in the cluster. |
| begin_start |
Starts stopped compute on all cluster nodes. |
| begin_stop |
Stops compute on all cluster nodes. |
| begin_update |
Updates an existing cluster. The request body can contain one or several properties from the cluster definition. |
| check_name_availability |
Checks availability of a cluster name. Cluster names should be globally unique; at least 3 characters and at most 40 characters long; they must only contain lowercase letters, numbers, and hyphens; and must not start or end with a hyphen. |
| get |
Gets information about a cluster such as compute and storage configuration and cluster lifecycle metadata such as cluster creation date and time. |
| list |
Lists all clusters in a subscription. |
| list_by_resource_group |
Lists all clusters in a resource group. |
begin_create
Creates a new cluster with servers.
begin_create(resource_group_name: str, cluster_name: str, parameters: _models.Cluster, *, content_type: str = 'application/json', **kwargs: Any) -> LROPoller[_models.Cluster]
Parameters
| Name | Description |
|---|---|
|
resource_group_name
Required
|
The name of the resource group. The name is case insensitive. Required. |
|
cluster_name
Required
|
The name of the cluster. Required. |
|
parameters
Required
|
The required parameters for creating or updating a cluster. Is either a Cluster type or a IO type. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
content_type
|
Body Parameter content-type. Known values are: 'application/json'. Default value is None. |
|
cls
|
A custom type or function that will be passed the direct response |
|
continuation_token
|
A continuation token to restart a poller from a saved state. |
|
polling
|
By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. |
|
polling_interval
|
Default waiting time between two polls for LRO operations if no Retry-After header is present. |
Returns
| Type | Description |
|---|---|
|
An instance of LROPoller that returns either Cluster or the result of cls(response) |
Exceptions
| Type | Description |
|---|---|
begin_delete
Deletes a cluster together with servers in it.
begin_delete(resource_group_name: str, cluster_name: str, **kwargs: Any) -> LROPoller[None]
Parameters
| Name | Description |
|---|---|
|
resource_group_name
Required
|
The name of the resource group. The name is case insensitive. Required. |
|
cluster_name
Required
|
The name of the cluster. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
cls
|
A custom type or function that will be passed the direct response |
|
continuation_token
|
A continuation token to restart a poller from a saved state. |
|
polling
|
By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. |
|
polling_interval
|
Default waiting time between two polls for LRO operations if no Retry-After header is present. |
Returns
| Type | Description |
|---|---|
|
An instance of LROPoller that returns either None or the result of cls(response) |
Exceptions
| Type | Description |
|---|---|
begin_promote_read_replica
Promotes read replica cluster to an independent read-write cluster.
begin_promote_read_replica(resource_group_name: str, cluster_name: str, **kwargs: Any) -> LROPoller[None]
Parameters
| Name | Description |
|---|---|
|
resource_group_name
Required
|
The name of the resource group. The name is case insensitive. Required. |
|
cluster_name
Required
|
The name of the cluster. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
cls
|
A custom type or function that will be passed the direct response |
|
continuation_token
|
A continuation token to restart a poller from a saved state. |
|
polling
|
By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. |
|
polling_interval
|
Default waiting time between two polls for LRO operations if no Retry-After header is present. |
Returns
| Type | Description |
|---|---|
|
An instance of LROPoller that returns either None or the result of cls(response) |
Exceptions
| Type | Description |
|---|---|
begin_restart
Restarts all nodes in the cluster.
begin_restart(resource_group_name: str, cluster_name: str, **kwargs: Any) -> LROPoller[None]
Parameters
| Name | Description |
|---|---|
|
resource_group_name
Required
|
The name of the resource group. The name is case insensitive. Required. |
|
cluster_name
Required
|
The name of the cluster. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
cls
|
A custom type or function that will be passed the direct response |
|
continuation_token
|
A continuation token to restart a poller from a saved state. |
|
polling
|
By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. |
|
polling_interval
|
Default waiting time between two polls for LRO operations if no Retry-After header is present. |
Returns
| Type | Description |
|---|---|
|
An instance of LROPoller that returns either None or the result of cls(response) |
Exceptions
| Type | Description |
|---|---|
begin_start
Starts stopped compute on all cluster nodes.
begin_start(resource_group_name: str, cluster_name: str, **kwargs: Any) -> LROPoller[None]
Parameters
| Name | Description |
|---|---|
|
resource_group_name
Required
|
The name of the resource group. The name is case insensitive. Required. |
|
cluster_name
Required
|
The name of the cluster. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
cls
|
A custom type or function that will be passed the direct response |
|
continuation_token
|
A continuation token to restart a poller from a saved state. |
|
polling
|
By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. |
|
polling_interval
|
Default waiting time between two polls for LRO operations if no Retry-After header is present. |
Returns
| Type | Description |
|---|---|
|
An instance of LROPoller that returns either None or the result of cls(response) |
Exceptions
| Type | Description |
|---|---|
begin_stop
Stops compute on all cluster nodes.
begin_stop(resource_group_name: str, cluster_name: str, **kwargs: Any) -> LROPoller[None]
Parameters
| Name | Description |
|---|---|
|
resource_group_name
Required
|
The name of the resource group. The name is case insensitive. Required. |
|
cluster_name
Required
|
The name of the cluster. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
cls
|
A custom type or function that will be passed the direct response |
|
continuation_token
|
A continuation token to restart a poller from a saved state. |
|
polling
|
By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. |
|
polling_interval
|
Default waiting time between two polls for LRO operations if no Retry-After header is present. |
Returns
| Type | Description |
|---|---|
|
An instance of LROPoller that returns either None or the result of cls(response) |
Exceptions
| Type | Description |
|---|---|
begin_update
Updates an existing cluster. The request body can contain one or several properties from the cluster definition.
begin_update(resource_group_name: str, cluster_name: str, parameters: _models.ClusterForUpdate, *, content_type: str = 'application/json', **kwargs: Any) -> LROPoller[_models.Cluster]
Parameters
| Name | Description |
|---|---|
|
resource_group_name
Required
|
The name of the resource group. The name is case insensitive. Required. |
|
cluster_name
Required
|
The name of the cluster. Required. |
|
parameters
Required
|
The parameters for updating a cluster. Is either a ClusterForUpdate type or a IO type. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
content_type
|
Body Parameter content-type. Known values are: 'application/json'. Default value is None. |
|
cls
|
A custom type or function that will be passed the direct response |
|
continuation_token
|
A continuation token to restart a poller from a saved state. |
|
polling
|
By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. |
|
polling_interval
|
Default waiting time between two polls for LRO operations if no Retry-After header is present. |
Returns
| Type | Description |
|---|---|
|
An instance of LROPoller that returns either Cluster or the result of cls(response) |
Exceptions
| Type | Description |
|---|---|
check_name_availability
Checks availability of a cluster name. Cluster names should be globally unique; at least 3 characters and at most 40 characters long; they must only contain lowercase letters, numbers, and hyphens; and must not start or end with a hyphen.
check_name_availability(name_availability_request: _models.NameAvailabilityRequest, *, content_type: str = 'application/json', **kwargs: Any) -> _models.NameAvailability
Parameters
| Name | Description |
|---|---|
|
name_availability_request
Required
|
The required parameters for checking if cluster name is available. Is either a NameAvailabilityRequest type or a IO type. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
content_type
|
Body Parameter content-type. Known values are: 'application/json'. Default value is None. |
|
cls
|
A custom type or function that will be passed the direct response |
Returns
| Type | Description |
|---|---|
|
NameAvailability or the result of cls(response) |
Exceptions
| Type | Description |
|---|---|
get
Gets information about a cluster such as compute and storage configuration and cluster lifecycle metadata such as cluster creation date and time.
get(resource_group_name: str, cluster_name: str, **kwargs: Any) -> Cluster
Parameters
| Name | Description |
|---|---|
|
resource_group_name
Required
|
The name of the resource group. The name is case insensitive. Required. |
|
cluster_name
Required
|
The name of the cluster. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
cls
|
A custom type or function that will be passed the direct response |
Returns
| Type | Description |
|---|---|
|
Cluster or the result of cls(response) |
Exceptions
| Type | Description |
|---|---|
list
Lists all clusters in a subscription.
list(**kwargs: Any) -> Iterable[Cluster]
Keyword-Only Parameters
| Name | Description |
|---|---|
|
cls
|
A custom type or function that will be passed the direct response |
Returns
| Type | Description |
|---|---|
|
An iterator like instance of either Cluster or the result of cls(response) |
Exceptions
| Type | Description |
|---|---|
list_by_resource_group
Lists all clusters in a resource group.
list_by_resource_group(resource_group_name: str, **kwargs: Any) -> Iterable[Cluster]
Parameters
| Name | Description |
|---|---|
|
resource_group_name
Required
|
The name of the resource group. The name is case insensitive. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
cls
|
A custom type or function that will be passed the direct response |
Returns
| Type | Description |
|---|---|
|
An iterator like instance of either Cluster or the result of cls(response) |
Exceptions
| Type | Description |
|---|---|
Attributes
models
models = <module 'azure.mgmt.cosmosdbforpostgresql.models' from 'C:\\ToolCache\\Python\\3.11.9\\x64\\Lib\\site-packages\\py2docfx\\venv\\venv102\\Lib\\site-packages\\azure\\mgmt\\cosmosdbforpostgresql\\models\\__init__.py'>