Skip to content

Commit

Permalink
CodeGen from PR 12943 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge 7f89de3ffe585e7556f03ec15be0fa0831534321 into 8c5be20
  • Loading branch information
SDKAuto committed Feb 17, 2021
1 parent 42ca353 commit a6e7137
Show file tree
Hide file tree
Showing 48 changed files with 9,986 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/redisenterprise/HISTORY.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.. :changelog:
Release History
===============

0.1.0
++++++
* Initial release.
109 changes: 109 additions & 0 deletions src/redisenterprise/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
# Azure CLI redisenterprise Extension #
This is the extension for redisenterprise

### How to use ###
Install this extension using the below CLI command
```
az extension add --name redisenterprise
```

### Included Features ###
#### redisenterprise operation-status ####
##### Show #####
```
az redisenterprise operation-status show --operation-id "testoperationid" --location "West US"
```
#### redisenterprise ####
##### Create #####
```
az redisenterprise create --cluster-name "cache1" --location "West US" --minimum-tls-version "1.2" \
--sku name="EnterpriseFlash_F300" capacity=3 --tags tag1="value1" --zones "1" "2" "3" --resource-group "rg1"
```
##### Show #####
```
az redisenterprise show --cluster-name "cache1" --resource-group "rg1"
```
##### List #####
```
az redisenterprise list --resource-group "rg1"
```
##### Update #####
```
az redisenterprise update --cluster-name "cache1" --minimum-tls-version "1.2" \
--sku name="EnterpriseFlash_F300" capacity=9 --tags tag1="value1" --resource-group "rg1"
```
##### Delete #####
```
az redisenterprise delete --cluster-name "cache1" --resource-group "rg1"
```
#### redisenterprise database ####
##### Create #####
```
az redisenterprise database create --cluster-name "cache1" --database-name "default" --client-protocol "Encrypted" \
--clustering-policy "EnterpriseCluster" --eviction-policy "AllKeysLRU" \
--modules name="RedisBloom" args="ERROR_RATE 0.00 INITIAL_SIZE 400" \
--modules name="RedisTimeSeries" args="RETENTION_POLICY 20" --modules name="RediSearch" \
--persistence aof-enabled=true aof-frequency="1s" --port 10000 --resource-group "rg1"
```
##### Show #####
```
az redisenterprise database show --cluster-name "cache1" --database-name "default" --resource-group "rg1"
```
##### List #####
```
az redisenterprise database list --cluster-name "cache1" --resource-group "rg1"
```
##### Update #####
```
az redisenterprise database update --cluster-name "cache1" --database-name "default" --client-protocol "Encrypted" \
--eviction-policy "AllKeysLRU" --persistence rdb-enabled=true rdb-frequency="12h" --resource-group "rg1"
```
##### Export #####
```
az redisenterprise database export --cluster-name "cache1" --database-name "default" \
--sas-uri "https://contosostorage.blob.core.window.net/urlToBlobContainer?sasKeyParameters" --resource-group "rg1"
```
##### Import #####
```
az redisenterprise database import --cluster-name "cache1" --database-name "default" \
--sas-uri "https://contosostorage.blob.core.window.net/urltoBlobFile?sasKeyParameters" --resource-group "rg1"
```
##### List-key #####
```
az redisenterprise database list-key --cluster-name "cache1" --database-name "default" --resource-group "rg1"
```
##### Regenerate-key #####
```
az redisenterprise database regenerate-key --cluster-name "cache1" --database-name "default" --key-type "Primary" \
--resource-group "rg1"
```
##### Delete #####
```
az redisenterprise database delete --cluster-name "cache1" --database-name "db1" --resource-group "rg1"
```
#### redisenterprise private-endpoint-connection ####
##### Put #####
```
az redisenterprise private-endpoint-connection put --cluster-name "cache1" --name "pectest01" \
--private-link-service-connection-state description="Auto-Approved" status="Approved" --resource-group "rg1"
az redisenterprise private-endpoint-connection wait --created --name "{myPrivateEndpointConnection}" \
--resource-group "{rg}"
```
##### Show #####
```
az redisenterprise private-endpoint-connection show --cluster-name "cache1" --name "pectest01" --resource-group "rg1"
```
##### List #####
```
az redisenterprise private-endpoint-connection list --cluster-name "cache1" --resource-group "rg1"
```
##### Delete #####
```
az redisenterprise private-endpoint-connection delete --cluster-name "cache1" --name "pectest01" --resource-group "rg1"
```
#### redisenterprise private-link-resource ####
##### List #####
```
az redisenterprise private-link-resource list --cluster-name "cache1" --resource-group "rg1"
```
50 changes: 50 additions & 0 deletions src/redisenterprise/azext_redisenterprise/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from azure.cli.core import AzCommandsLoader
from azext_redisenterprise.generated._help import helps # pylint: disable=unused-import
try:
from azext_redisenterprise.manual._help import helps # pylint: disable=reimported
except ImportError:
pass


class RedisEnterpriseManagementClientCommandsLoader(AzCommandsLoader):

def __init__(self, cli_ctx=None):
from azure.cli.core.commands import CliCommandType
from azext_redisenterprise.generated._client_factory import cf_redisenterprise_cl
redisenterprise_custom = CliCommandType(
operations_tmpl='azext_redisenterprise.custom#{}',
client_factory=cf_redisenterprise_cl)
parent = super(RedisEnterpriseManagementClientCommandsLoader, self)
parent.__init__(cli_ctx=cli_ctx, custom_command_type=redisenterprise_custom)

def load_command_table(self, args):
from azext_redisenterprise.generated.commands import load_command_table
load_command_table(self, args)
try:
from azext_redisenterprise.manual.commands import load_command_table as load_command_table_manual
load_command_table_manual(self, args)
except ImportError:
pass
return self.command_table

def load_arguments(self, command):
from azext_redisenterprise.generated._params import load_arguments
load_arguments(self, command)
try:
from azext_redisenterprise.manual._params import load_arguments as load_arguments_manual
load_arguments_manual(self, command)
except ImportError:
pass


COMMAND_LOADER_CLS = RedisEnterpriseManagementClientCommandsLoader
17 changes: 17 additions & 0 deletions src/redisenterprise/azext_redisenterprise/action.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
# pylint: disable=wildcard-import
# pylint: disable=unused-wildcard-import

from .generated.action import * # noqa: F403
try:
from .manual.action import * # noqa: F403
except ImportError:
pass
3 changes: 3 additions & 0 deletions src/redisenterprise/azext_redisenterprise/azext_metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"azext.minCliCoreVersion": "2.15.0"
}
17 changes: 17 additions & 0 deletions src/redisenterprise/azext_redisenterprise/custom.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
# pylint: disable=wildcard-import
# pylint: disable=unused-wildcard-import

from .generated.custom import * # noqa: F403
try:
from .manual.custom import * # noqa: F403
except ImportError:
pass
12 changes: 12 additions & 0 deletions src/redisenterprise/azext_redisenterprise/generated/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

__path__ = __import__('pkgutil').extend_path(__path__, __name__)
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------


def cf_redisenterprise_cl(cli_ctx, *_):
from azure.cli.core.commands.client_factory import get_mgmt_service_client
from azext_redisenterprise.vendored_sdks.redisenterprise import RedisEnterpriseManagementClient
return get_mgmt_service_client(cli_ctx,
RedisEnterpriseManagementClient)


def cf_operation_status(cli_ctx, *_):
return cf_redisenterprise_cl(cli_ctx).operations_status


def cf_redis_enterprise(cli_ctx, *_):
return cf_redisenterprise_cl(cli_ctx).redis_enterprise


def cf_database(cli_ctx, *_):
return cf_redisenterprise_cl(cli_ctx).databases


def cf_private_endpoint_connection(cli_ctx, *_):
return cf_redisenterprise_cl(cli_ctx).private_endpoint_connections


def cf_private_link_resource(cli_ctx, *_):
return cf_redisenterprise_cl(cli_ctx).private_link_resources
Loading

0 comments on commit a6e7137

Please sign in to comment.