Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -136,3 +136,14 @@ def cf_restorable_mongodb_collections(cli_ctx, _):

def cf_restorable_mongodb_resources(cli_ctx, _):
return cf_cosmosdb(cli_ctx).restorable_mongodb_resources

def cf_db_locations(cli_ctx, _):
return cf_cosmosdb(cli_ctx).locations

def cf_cassandra_cluster(cli_ctx, _):
return cf_cosmosdb(cli_ctx).cassandra_clusters


def cf_cassandra_data_center(cli_ctx, _):
return cf_cosmosdb(cli_ctx).cassandra_data_centers

181 changes: 180 additions & 1 deletion src/azure-cli/azure/cli/command_modules/cosmosdb/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -1148,7 +1148,186 @@
short-summary: List all the databases and its collections that can be restored in the given account at the given timesamp and region.
"""

helps['cosmosdb sql retrieve-latest-backup-time'] = """
helps['cosmosdb sql container retrieve-latest-backup-time'] = """
type: command
short-summary: Retrieves latest restorable timestamp for the given sql container in given region.
"""

helps['cosmosdb mongodb collection retrieve-latest-backup-time'] = """
type: command
short-summary: Retrieves latest restorable timestamp for the given mongodb collection in given region.
"""

helps['managed-cassandra'] = """
type: group
short-summary: Azure Managed Cassandra.
"""

helps['managed-cassandra cluster'] = """
type: group
short-summary: Azure Managed Cassandra Cluster.
"""

helps['managed-cassandra cluster create'] = """
type: command
short-summary: Create a Managed Cassandra Cluster.
examples:
- name: Create a Managed Cassandra Cluster in a given Subscription and ResourceGroup. Either a cassandra admin password or external seed needs are required.
text: |
az managed-cassandra cluster create \\
--resource-group MyResourceGroup \\
--cluster-name MyCluster \\
--location MyLocation \\
--initial-cassandra-admin-password password \\
--delegated-management-subnet-id /subscriptions/94d9b402-77b4-4049-b4c1-947bc6b7729b/resourceGroups/My-vnet/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/test-subnet
"""

helps['managed-cassandra cluster update'] = """
type: command
short-summary: Update a Managed Cassandra Cluster.
examples:
- name: Update External Seed Nodes of a given cluster.
text: |
az managed-cassandra cluster update --resource-group MyResourceGroup --cluster-name MyCluster --external-seed-nodes 127.0.0.1 127.0.0.2
- name: Update External Gossip Certificates of a given cluster. Certs can be passed in as strings or the file locations.
text: |
az managed-cassandra cluster update --resource-group MyResourceGroup --cluster-name MyCluster --external-gossip-certificates C:/MyFolder/test.pem BeginCert-MLXCF-EndCert
"""

helps['managed-cassandra cluster delete'] = """
type: command
short-summary: Deletes a Managed Cassandra Cluster.
examples:
- name: Deletes a Managed Cassandra Cluster in the given Subscription and ResourceGroup.
text: |
az managed-cassandra cluster delete --resource-group MyResourceGroup --cluster-name MyCluster
"""

helps['managed-cassandra cluster show'] = """
type: command
short-summary: Get a Managed Cassandra Cluster Resource.
examples:
- name: Gets a Managed Cassandra Cluster Resource. ProvisioningState tells the state of this cluster. If the cluster doesnot exist a NotFound response is returned.
text: |
az managed-cassandra cluster show --resource-group MyResourceGroup --cluster-name MyCluster
"""

helps['managed-cassandra cluster list'] = """
type: command
short-summary: List the Managed Cassandra Clusters in a ResourceGroup and Subscription. If the ResourceGroup is not specified all the clusters in this Subscription are returned.
examples:
- name: List all Managed Cassandra Clusters in a given Subscription and ResourceGroup.
text: |
az managed-cassandra cluster list --resource-group MyResourceGroup
- name: List all Managed Cassandra Clusters in a given Subscription.
text: |
az managed-cassandra cluster list
"""

helps['managed-cassandra cluster backups'] = """
type: command
short-summary: List the backups of this cluster that are available to restore.
examples:
- name: This command lists the backups of this cluster that are available to restore.
text: |
az managed-cassandra cluster backups --resource-group MyResourceGroup --cluster-name MyCluster
"""

helps['managed-cassandra cluster command'] = """
type: command
short-summary: Invoke a command like nodetool for cassandra maintenance.
examples:
- name: This command runs nodetool status in a host node of the cluster.
text: |
az managed-cassandra cluster command --resource-group MyResourceGroup --cluster-name MyCluster --command-name "nodetool status" --host "10.0.1.12"
"""

helps['managed-cassandra cluster deallocate'] = """
type: command
short-summary: Deallocate the Managed Cassandra Cluster and Associated Data Centers. Deallocation will deallocate the host virtual machine of this cluster, and reserved the data disk. This won't do anything on an already deallocated cluster. Use Start to restart the cluster.
examples:
- name: This command deallocates this cluster.
text: |
az managed-cassandra cluster deallocate --resource-group MyResourceGroup --cluster-name MyCluster
"""

helps['managed-cassandra cluster start'] = """
type: command
short-summary: Start the Managed Cassandra Cluster and Associated Data Centers. Start will start the host virtual machine of this cluster with reserved data disk. This won't do anything on an already running cluster. Use Deallocate to deallocate the cluster.
examples:
- name: This command starts this cluster.
text: |
az managed-cassandra cluster start --resource-group MyResourceGroup --cluster-name MyCluster
"""

helps['managed-cassandra cluster status'] = """
type: command
short-summary: Gets the CPU, memory, and disk usage statistics for each Cassandra node in a cluster.
examples:
- name: Gets the CPU, memory, and disk usage statistics for each Cassandra node in a cluster.
text: |
az managed-cassandra cluster status --resource-group MyResourceGroup --cluster-name MyCluster
"""

helps['managed-cassandra datacenter'] = """
type: group
short-summary: Azure Managed Cassandra DataCenter.
"""

helps['managed-cassandra datacenter create'] = """
type: command
short-summary: Create a Datacenter in an Azure Managed Cassandra Cluster.
examples:
- name: Create a Managed Cassandra Datacenter in a Cassandra Cluster. Each datacenter should atleast have 3 nodes.
text: |
az managed-cassandra datacenter create \\
--resource-group MyResourceGroup \\
--cluster-name MyCluster \\
--data-center-name MyDataCenter \\
--data-center-location westus2 \\
--node-count 3 \\
--delegated-subnet-id /subscriptions/94d9b402-77b4-4049-b4c1-947bc6b7729b/resourceGroups/My-vnet/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/test-subnet
"""

helps['managed-cassandra datacenter update'] = """
type: command
short-summary: Update a Datacenter in an Azure Managed Cassandra Cluster.
examples:
- name: Scale the number of nodes in a datacenter. This is a scale up operation assuming that the create datacenter was done with 3 nodes. Each datacenter should atleast have 3 nodes.
text: |
az managed-cassandra datacenter update --resource-group MyResourceGroup --cluster-name MyCluster --data-center-name MyDataCenter --node-count 6
- name: Scale the number of nodes in a datacenter. This is a scale down operation assuming that the create datacenter was done with 3 nodes, followed by a scale up to 6 nodes. Each datacenter should atleast have 3 nodes.
text: |
az managed-cassandra datacenter update --resource-group MyResourceGroup --cluster-name MyCluster --data-center-name MyDataCenter --node-count 4
"""

helps['managed-cassandra datacenter delete'] = """
type: command
short-summary: Deletes a Managed Cassandra Datacenter.
examples:
- name: Deletes a Managed Cassandra Datacenter in the given Cluster.
text: |
az managed-cassandra datacenter delete --resource-group MyResourceGroup --cluster-name MyCluster --data-center-name MyDataCenter
- name: Deletes a Managed Cassandra Datacenter in the given Cluster without waiting for the long-running operation to finish.
text: |
az managed-cassandra datacenter delete --resource-group MyResourceGroup --cluster-name MyCluster --data-center-name MyDataCenter --no-wait
"""

helps['managed-cassandra datacenter show'] = """
type: command
short-summary: Get a Managed Cassandra DataCenter Resource.
examples:
- name: Gets a Managed Cassandra Datacenter Resource. ProvisioningState tells the state of this datacenter. If the datacenter does not exist a NotFound response is returned.
text: |
az managed-cassandra datacenter show --resource-group MyResourceGroup --cluster-name MyCluster --data-center-name MyDataCenter
"""

helps['managed-cassandra datacenter list'] = """
type: command
short-summary: List the Managed Cassandra Datacenters in a given Cluster.
examples:
- name: List all Managed Cassandra DataCenters in a given Cluster.
text: |
az managed-cassandra datacenter list --resource-group MyResourceGroup --cluster-name MyCluster
"""

Loading