From 1cc4db5a72389ee7627e76519174a4aef73ec230 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Fri, 30 Jul 2021 06:48:57 +0000 Subject: [PATCH] CodeGen from PR 15449 in Azure/azure-rest-api-specs Merge f8c5381af0a6910d6c93d3ccc5aca75477398349 into 1d28da6ddb09d18ef055e36f57c781e0f76eb3ed --- src/datadog/azext_datadog/azext_metadata.json | 2 +- src/datadog/azext_datadog/generated/_help.py | 23 +- .../azext_datadog/generated/_params.py | 12 +- .../azext_datadog/generated/commands.py | 4 +- src/datadog/azext_datadog/generated/custom.py | 67 +-- .../tests/latest/example_steps.py | 263 ++++++++++++ .../tests/latest/test_datadog_scenario.py | 405 ++++-------------- .../aio/operations/_monitors_operations.py | 30 +- ...ingle_sign_on_configurations_operations.py | 8 +- .../aio/operations/_tag_rules_operations.py | 6 +- .../operations/_monitors_operations.py | 30 +- ...ingle_sign_on_configurations_operations.py | 8 +- .../operations/_tag_rules_operations.py | 6 +- .../vendored_sdks/datadog/py.typed | 1 + src/datadog/report.md | 370 ++++++++++++++++ src/datadog/setup.cfg | 5 +- src/datadog/setup.py | 2 +- 17 files changed, 802 insertions(+), 440 deletions(-) create mode 100644 src/datadog/azext_datadog/tests/latest/example_steps.py create mode 100644 src/datadog/azext_datadog/vendored_sdks/datadog/py.typed create mode 100644 src/datadog/report.md diff --git a/src/datadog/azext_datadog/azext_metadata.json b/src/datadog/azext_datadog/azext_metadata.json index 14d2c1ae419..cfc30c747c7 100644 --- a/src/datadog/azext_datadog/azext_metadata.json +++ b/src/datadog/azext_datadog/azext_metadata.json @@ -1,4 +1,4 @@ { "azext.isExperimental": true, - "azext.minCliCoreVersion": "2.17.0" + "azext.minCliCoreVersion": "2.15.0" } \ No newline at end of file diff --git a/src/datadog/azext_datadog/generated/_help.py b/src/datadog/azext_datadog/generated/_help.py index c9c74a07ed0..1ac9685ba17 100644 --- a/src/datadog/azext_datadog/generated/_help.py +++ b/src/datadog/azext_datadog/generated/_help.py @@ -14,14 +14,14 @@ helps['datadog terms'] = """ type: group - short-summary: Manage marketplace agreements with datadog + short-summary: Manage marketplace agreement with datadog """ helps['datadog terms list'] = """ type: command - short-summary: "List datadog marketplace agreements" + short-summary: "List Datadog marketplace agreements in the subscription." examples: - - name: List marketplace agreements + - name: MarketplaceAgreements_List text: |- az datadog terms list """ @@ -126,14 +126,11 @@ examples: - name: Monitors_Create text: |- - az datadog monitor create --name "myMonitor" --resource-group "myResourceGroup" --location "West US 2" \ ---tags Environment="Dev" --user-info name="Alice" email-address="alice@microsoft.com" phone-number="123-456-7890" \ ---type "SystemAssigned" --sku-name "payg_v2_Monthly" - - name: Monitors creation with linking to Datadogo organization. - text: |- - az datadog monitor create --name "myMonitor" --resource-group "myResourceGroup" --location "West US 2" \ ---datadog-organization-properties api-key=XX application-key=XX --tags Environment="Dev" --user-info name="Alice" \ -email-address="alice@microsoft.com" phone-number="123-456-7890" --type "SystemAssigned" --sku-name "Linked" + az datadog monitor create --monitor-name "myMonitor" --name "myMonitor" --location "West US" \ +--datadog-organization-properties name="myOrg" enterprise-app-id="00000000-0000-0000-0000-000000000000" \ +linking-auth-code="someAuthCode" linking-client-id="00000000-0000-0000-0000-000000000000" subscription="pro" \ +--user-info name="Alice" email-address="alice@microsoft.com" phone-number="123-456-7890" --name "free_Monthly" --tags \ +Environment="Dev" --resource-group "myResourceGroup" """ helps['datadog monitor update'] = """ @@ -142,8 +139,8 @@ examples: - name: Monitors_Update text: |- - az datadog monitor update --name "myMonitor" --tags Environment="Dev" --monitoring-status "Disabled" \ ---resource-group "myResourceGroup" + az datadog monitor update --monitor-name "myMonitor" --tags Environment="Dev" --resource-group \ +"myResourceGroup" """ helps['datadog monitor delete'] = """ diff --git a/src/datadog/azext_datadog/generated/_params.py b/src/datadog/azext_datadog/generated/_params.py index 963f1cc3fb1..d0acc0dc2e8 100644 --- a/src/datadog/azext_datadog/generated/_params.py +++ b/src/datadog/azext_datadog/generated/_params.py @@ -48,8 +48,7 @@ def load_arguments(self, _): with self.argument_context('datadog monitor create') as c: c.argument('resource_group_name', resource_group_name_type) - c.argument('monitor_name', options_list=['--name', '-n', '--monitor-name'], type=str, help='Monitor resource ' - 'name') + c.argument('monitor_name', type=str, help='Monitor resource name') c.argument('tags', tags_type) c.argument('location', arg_type=get_location_type(self.cli_ctx), required=False, validator=get_default_location_from_resource_group) @@ -58,16 +57,13 @@ def load_arguments(self, _): c.argument('datadog_organization_properties', action=AddDatadogOrganizationProperties, nargs='+', help='Datadog organization properties') c.argument('user_info', action=AddUserInfo, nargs='+', help='User info') - c.argument('sku_name', type=str, help='Name of the SKU.', arg_group='Sku') + c.argument('name', type=str, help='Name of the SKU.', arg_group='Sku') with self.argument_context('datadog monitor update') as c: c.argument('resource_group_name', resource_group_name_type) - c.argument('monitor_name', options_list=['--name', '-n', '--monitor-name'], type=str, help='Monitor resource ' - 'name', id_part='name') + c.argument('monitor_name', type=str, help='Monitor resource name', id_part='name') c.argument('tags', tags_type) - c.argument('monitoring_status', type=str, help='Flag specifying if the resource monitoring is enabled or ' - 'disabled. Allowed values: "Enabled", "Disabled".') - c.argument('sku_name', type=str, help='Name of the SKU.', arg_group='Sku') + c.argument('name', type=str, help='Name of the SKU.', arg_group='Sku') with self.argument_context('datadog monitor delete') as c: c.argument('resource_group_name', resource_group_name_type) diff --git a/src/datadog/azext_datadog/generated/commands.py b/src/datadog/azext_datadog/generated/commands.py index b4d1bba3616..548d41a5fda 100644 --- a/src/datadog/azext_datadog/generated/commands.py +++ b/src/datadog/azext_datadog/generated/commands.py @@ -21,7 +21,7 @@ def load_command_table(self, _): 'greementsOperations.{}', client_factory=cf_marketplace_agreement) with self.command_group('datadog terms', datadog_marketplace_agreement, - client_factory=cf_marketplace_agreement, is_experimental=True) as g: + client_factory=cf_marketplace_agreement) as g: g.custom_command('list', 'datadog_terms_list') g.custom_command('create', 'datadog_terms_create') g.custom_command('update', 'datadog_terms_update') @@ -69,5 +69,5 @@ def load_command_table(self, _): custom_func_name='datadog_sso_config_update', supports_no_wait=True) g.custom_wait_command('wait', 'datadog_sso_config_show') - with self.command_group('datadog'): + with self.command_group('datadog', is_experimental=True): pass diff --git a/src/datadog/azext_datadog/generated/custom.py b/src/datadog/azext_datadog/generated/custom.py index 02b45eaca87..af3a40e3d6f 100644 --- a/src/datadog/azext_datadog/generated/custom.py +++ b/src/datadog/azext_datadog/generated/custom.py @@ -10,7 +10,6 @@ # pylint: disable=too-many-lines # pylint: disable=unused-argument -from azure.cli.command_modules.role.custom import create_role_assignment, list_role_assignments, delete_role_assignments from azure.cli.core.util import sdk_no_wait @@ -18,13 +17,6 @@ def datadog_terms_list(client): return client.list() -def datadog_marketplace_agreement_create(client, - properties=None): - body = {} - body['properties'] = properties - return client.create_or_update(body=body) - - def datadog_terms_create(client, properties=None): body = {} @@ -53,8 +45,7 @@ def datadog_monitor_show(client, monitor_name=monitor_name) -def datadog_monitor_create(cmd, - client, +def datadog_monitor_create(client, resource_group_name, monitor_name, tags=None, @@ -62,7 +53,7 @@ def datadog_monitor_create(cmd, type_=None, datadog_organization_properties=None, user_info=None, - sku_name=None, + name=None, no_wait=False): body = {} body['tags'] = tags @@ -74,36 +65,26 @@ def datadog_monitor_create(cmd, body['properties']['datadog_organization_properties'] = datadog_organization_properties body['properties']['user_info'] = user_info body['sku'] = {} - body['sku']['name'] = sku_name - poller = sdk_no_wait(no_wait, - client.begin_create, - resource_group_name=resource_group_name, - monitor_name=monitor_name, - body=body) - result = poller.result() - if result and result.identity and result.identity.principal_id: - scrope = '/subscriptions/' + result.id.split('/')[2] - create_role_assignment(cmd, role='43d0d8ad-25c7-4714-9337-8ba259a9fe05', - assignee_object_id=result.identity.principal_id, - scope=scrope, assignee_principal_type='ServicePrincipal') - return poller + body['sku']['name'] = name + return sdk_no_wait(no_wait, + client.begin_create, + resource_group_name=resource_group_name, + monitor_name=monitor_name, + body=body) def datadog_monitor_update(client, resource_group_name, monitor_name, tags=None, - monitoring_status=None, - sku_name=None, + name=None, no_wait=False): body = {} body['tags'] = tags - if monitoring_status is not None: - body['properties'] = {} - body['properties']['monitoring_status'] = monitoring_status - if sku_name is not None: - body['sku'] = {} - body['sku']['name'] = sku_name + body['sku'] = {} + body['sku']['name'] = name + body['properties'] = {} + body['properties']['monitoring_status'] = "Enabled" return sdk_no_wait(no_wait, client.begin_update, resource_group_name=resource_group_name, @@ -111,26 +92,14 @@ def datadog_monitor_update(client, body=body) -def datadog_monitor_delete(cmd, - client, +def datadog_monitor_delete(client, resource_group_name, monitor_name, no_wait=False): - monitor = client.get(resource_group_name=resource_group_name, - monitor_name=monitor_name) - poller = sdk_no_wait(no_wait, - client.begin_delete, - resource_group_name=resource_group_name, - monitor_name=monitor_name) - result = poller.result() - if not result: - scrope = '/subscriptions/' + monitor.id.split('/')[2] - role_assignments = list_role_assignments(cmd, role='43d0d8ad-25c7-4714-9337-8ba259a9fe05', scope=scrope) - for i in role_assignments: - if i.get('principalId') == monitor.identity.principal_id: - delete_role_assignments(cmd, ids=[i.get('id')]) - break - return poller + return sdk_no_wait(no_wait, + client.begin_delete, + resource_group_name=resource_group_name, + monitor_name=monitor_name) def datadog_monitor_get_default_key(client, diff --git a/src/datadog/azext_datadog/tests/latest/example_steps.py b/src/datadog/azext_datadog/tests/latest/example_steps.py new file mode 100644 index 00000000000..194dd22cf0f --- /dev/null +++ b/src/datadog/azext_datadog/tests/latest/example_steps.py @@ -0,0 +1,263 @@ +# -------------------------------------------------------------------------- +# 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 .. import try_manual + + +# EXAMPLE: /MarketplaceAgreements/put/MarketplaceAgreements_CreateOrUpdate +@try_manual +def step_terms_create(test, rg, checks=None): + if checks is None: + checks = [] + test.cmd('az datadog terms create ' + '--properties accepted=true', + checks=checks) + + +# EXAMPLE: /MarketplaceAgreements/get/MarketplaceAgreements_List +@try_manual +def step_terms_list(test, rg, checks=None): + if checks is None: + checks = [] + test.cmd('az datadog terms list', + checks=checks) + + +# EXAMPLE: /Monitors/put/Monitors_Create +@try_manual +def step_monitor_create(test, rg, checks=None): + if checks is None: + checks = [] + test.cmd('az datadog monitor create ' + '--monitor-name "{myMonitor}" ' + '--name "{myMonitor}" ' + '--location "West US" ' + '--datadog-organization-properties name="myOrg" enterprise-app-id="00000000-0000-0000-0000-000000000000" ' + 'linking-auth-code="someAuthCode" linking-client-id="00000000-0000-0000-0000-000000000000" ' + 'subscription="pro" ' + '--user-info name="Alice" email-address="alice@microsoft.com" phone-number="123-456-7890" ' + '--name "free_Monthly" ' + '--tags Environment="Dev" ' + '--resource-group "{rg}"', + checks=[]) + test.cmd('az datadog monitor wait --created ' + '--monitor-name "{myMonitor}" ' + '--resource-group "{rg}"', + checks=checks) + + +# EXAMPLE: /Monitors/get/Monitors_Get +@try_manual +def step_monitor_show(test, rg, checks=None): + if checks is None: + checks = [] + test.cmd('az datadog monitor show ' + '--name "{myMonitor}" ' + '--resource-group "{rg}"', + checks=checks) + + +# EXAMPLE: /Monitors/get/Monitors_List +@try_manual +def step_monitor_list(test, rg, checks=None): + if checks is None: + checks = [] + test.cmd('az datadog monitor list ' + '-g ""', + checks=checks) + + +# EXAMPLE: /Monitors/get/Monitors_ListByResourceGroup +@try_manual +def step_monitor_list2(test, rg, checks=None): + if checks is None: + checks = [] + test.cmd('az datadog monitor list ' + '--resource-group "{rg}"', + checks=checks) + + +# EXAMPLE: /Monitors/patch/Monitors_Update +@try_manual +def step_monitor_update(test, rg, checks=None): + if checks is None: + checks = [] + test.cmd('az datadog monitor update ' + '--monitor-name "{myMonitor}" ' + '--tags Environment="Dev" ' + '--resource-group "{rg}"', + checks=checks) + + +# EXAMPLE: /Monitors/post/Monitors_GetDefaultKey +@try_manual +def step_monitor_get_default_key(test, rg, checks=None): + if checks is None: + checks = [] + test.cmd('az datadog monitor get-default-key ' + '--name "{myMonitor}" ' + '--resource-group "{rg}"', + checks=checks) + + +# EXAMPLE: /Monitors/post/Monitors_ListApiKeys +@try_manual +def step_monitor_list_api_key(test, rg, checks=None): + if checks is None: + checks = [] + test.cmd('az datadog monitor list-api-key ' + '--name "{myMonitor}" ' + '--resource-group "{rg}"', + checks=checks) + + +# EXAMPLE: /Monitors/post/Monitors_ListHosts +@try_manual +def step_monitor_list_host(test, rg, checks=None): + if checks is None: + checks = [] + test.cmd('az datadog monitor list-host ' + '--name "{myMonitor}" ' + '--resource-group "{rg}"', + checks=checks) + + +# EXAMPLE: /Monitors/post/Monitors_ListLinkedResources +@try_manual +def step_monitor_list_linked_resource(test, rg, checks=None): + if checks is None: + checks = [] + test.cmd('az datadog monitor list-linked-resource ' + '--name "{myMonitor}" ' + '--resource-group "{rg}"', + checks=checks) + + +# EXAMPLE: /Monitors/post/Monitors_ListMonitoredResources +@try_manual +def step_monitor_list_monitored_resource(test, rg, checks=None): + if checks is None: + checks = [] + test.cmd('az datadog monitor list-monitored-resource ' + '--name "{myMonitor}" ' + '--resource-group "{rg}"', + checks=checks) + + +# EXAMPLE: /Monitors/post/Monitors_RefreshSetPasswordLink +@try_manual +def step_monitor_refresh_set_password_link(test, rg, checks=None): + if checks is None: + checks = [] + test.cmd('az datadog monitor refresh-set-password-link ' + '--name "{myMonitor}" ' + '--resource-group "{rg}"', + checks=checks) + + +# EXAMPLE: /Monitors/post/Monitors_SetDefaultKey +@try_manual +def step_monitor_set_default_key(test, rg, checks=None): + if checks is None: + checks = [] + test.cmd('az datadog monitor set-default-key ' + '--monitor-name "{myMonitor}" ' + '--key "1111111111111111aaaaaaaaaaaaaaaa" ' + '--resource-group "{rg}"', + checks=checks) + + +# EXAMPLE: /SingleSignOnConfigurations/put/SingleSignOnConfigurations_CreateOrUpdate +@try_manual +def step_sso_config_create(test, rg, checks=None): + if checks is None: + checks = [] + test.cmd('az datadog sso-config create ' + '--configuration-name "default" ' + '--monitor-name "{myMonitor}" ' + '--properties enterprise-app-id="00000000-0000-0000-0000-000000000000" single-sign-on-state="Enable" ' + '--resource-group "{rg}"', + checks=checks) + + +# EXAMPLE: /SingleSignOnConfigurations/get/SingleSignOnConfigurations_Get +@try_manual +def step_sso_config_show(test, rg, checks=None): + if checks is None: + checks = [] + test.cmd('az datadog sso-config show ' + '--configuration-name "default" ' + '--monitor-name "{myMonitor}" ' + '--resource-group "{rg}"', + checks=checks) + + +# EXAMPLE: /SingleSignOnConfigurations/get/SingleSignOnConfigurations_List +@try_manual +def step_sso_config_list(test, rg, checks=None): + if checks is None: + checks = [] + test.cmd('az datadog sso-config list ' + '--monitor-name "{myMonitor}" ' + '--resource-group "{rg}"', + checks=checks) + + +# EXAMPLE: /TagRules/put/TagRules_CreateOrUpdate +@try_manual +def step_tag_rule_create(test, rg, checks=None): + if checks is None: + checks = [] + test.cmd('az datadog tag-rule create ' + '--monitor-name "{myMonitor}" ' + '--log-rules-filtering-tags name="Environment" action="Include" value="Prod" ' + '--log-rules-filtering-tags name="Environment" action="Exclude" value="Dev" ' + '--send-aad-logs false ' + '--send-resource-logs true ' + '--send-subscription-logs true ' + '--resource-group "{rg}" ' + '--rule-set-name "default"', + checks=checks) + + +# EXAMPLE: /TagRules/get/TagRules_Get +@try_manual +def step_tag_rule_show(test, rg, checks=None): + if checks is None: + checks = [] + test.cmd('az datadog tag-rule show ' + '--monitor-name "{myMonitor}" ' + '--resource-group "{rg}" ' + '--rule-set-name "default"', + checks=checks) + + +# EXAMPLE: /TagRules/get/TagRules_List +@try_manual +def step_tag_rule_list(test, rg, checks=None): + if checks is None: + checks = [] + test.cmd('az datadog tag-rule list ' + '--monitor-name "{myMonitor}" ' + '--resource-group "{rg}"', + checks=checks) + + +# EXAMPLE: /Monitors/delete/Monitors_Delete +@try_manual +def step_monitor_delete(test, rg, checks=None): + if checks is None: + checks = [] + test.cmd('az datadog monitor delete -y ' + '--name "{myMonitor}" ' + '--resource-group "{rg}"', + checks=checks) + diff --git a/src/datadog/azext_datadog/tests/latest/test_datadog_scenario.py b/src/datadog/azext_datadog/tests/latest/test_datadog_scenario.py index f22f4a491fb..29c2835b813 100644 --- a/src/datadog/azext_datadog/tests/latest/test_datadog_scenario.py +++ b/src/datadog/azext_datadog/tests/latest/test_datadog_scenario.py @@ -9,342 +9,111 @@ # -------------------------------------------------------------------------- import os -import mock from azure.cli.testsdk import ScenarioTest from azure.cli.testsdk import ResourceGroupPreparer -from azure_devtools.scenario_tests import AllowLargeResponse -from .. import try_manual, raise_if, calc_coverage +from .example_steps import step_terms_create +from .example_steps import step_terms_list +from .example_steps import step_monitor_create +from .example_steps import step_monitor_show +from .example_steps import step_monitor_list +from .example_steps import step_monitor_list2 +from .example_steps import step_monitor_update +from .example_steps import step_monitor_get_default_key +from .example_steps import step_monitor_list_api_key +from .example_steps import step_monitor_list_host +from .example_steps import step_monitor_list_linked_resource +from .example_steps import step_monitor_list_monitored_resource +from .example_steps import step_monitor_refresh_set_password_link +from .example_steps import step_monitor_set_default_key +from .example_steps import step_sso_config_create +from .example_steps import step_sso_config_show +from .example_steps import step_sso_config_list +from .example_steps import step_tag_rule_create +from .example_steps import step_tag_rule_show +from .example_steps import step_tag_rule_list +from .example_steps import step_monitor_delete +from .. import ( + try_manual, + raise_if, + calc_coverage +) TEST_DIR = os.path.abspath(os.path.join(os.path.abspath(__file__), '..')) +# Env setup_scenario @try_manual -def setup(): +def setup_scenario(test, rg): pass -# EXAMPLE: /Monitors/put/Monitors_Create +# Env cleanup_scenario @try_manual -def step__monitors_put_monitors_create(test): - with mock.patch('azure.cli.command_modules.role.custom._gen_guid', side_effect=test.create_guid): - test.cmd('az datadog monitor create ' - '--name "{myMonitor}" ' - '--sku-name "drawdown_testing_20200904_Monthly" ' - '--location "East US 2 EUAP" ' - '--type "SystemAssigned" ' - '--user-info name="Alice" email-address="alice@microsoft.com" phone-number="123-456-7890" ' - '--tags Environment="Dev" ' - '--resource-group "{rg}"', - checks=[ - test.check("name", "{myMonitor}", case_sensitive=False), - test.check("sku.name", "drawdown_testing_20200904_Monthly", case_sensitive=False), - test.check("location", "eastus2euap", case_sensitive=False), - test.check("properties.marketplaceSubscriptionStatus", "Active", case_sensitive=False), - test.check("properties.monitoringStatus", "Enabled", case_sensitive=False), - test.check("properties.provisioningState", "Succeeded", case_sensitive=False), - test.check("tags.Environment", "Dev", case_sensitive=False), - ]) - test.cmd('az datadog monitor wait --created ' - '--name "{myMonitor}" ' - '--resource-group "{rg}"', - checks=[]) - - -# EXAMPLE: /Monitors/get/Monitors_Get -@try_manual -def step__monitors_get_monitors_get(test): - test.cmd('az datadog monitor show ' - '--name "{myMonitor}" ' - '--resource-group "{rg}"', - checks=[ - test.check("name", "{myMonitor}", case_sensitive=False), - test.check("sku.name", "drawdown_testing_20200904_Monthly", case_sensitive=False), - test.check("location", "eastus2euap", case_sensitive=False), - test.check("properties.marketplaceSubscriptionStatus", "Active", case_sensitive=False), - test.check("properties.monitoringStatus", "Enabled", case_sensitive=False), - test.check("properties.provisioningState", "Succeeded", case_sensitive=False), - test.check("tags.Environment", "Dev", case_sensitive=False), - ]) - - -# EXAMPLE: /Monitors/get/Monitors_List -@try_manual -def step__monitors_get_monitors_list(test): - test.cmd('az datadog monitor list ' - '-g ""', - checks=[ - test.check('length(@)', 1), - ]) - - -# EXAMPLE: /Monitors/get/Monitors_ListByResourceGroup -@try_manual -def step__monitors_get_monitors_listbyresourcegroup(test): - test.cmd('az datadog monitor list ' - '--resource-group "{rg}"', - checks=[ - test.check('length(@)', 1), - ]) - - -# TODO: Add tests for --monitoring-status and --sku-name arguments -# EXAMPLE: /Monitors/patch/Monitors_Update -@try_manual -def step__monitors_patch_monitors_update(test): - test.cmd('az datadog monitor update ' - '--name "{myMonitor}" ' - '--tags Environment="Dev2" ' - '--resource-group "{rg}"', - checks=[ - test.check("name", "{myMonitor}", case_sensitive=False), - test.check("sku.name", "drawdown_testing_20200904_Monthly", case_sensitive=False), - test.check("location", "eastus2euap", case_sensitive=False), - test.check("properties.marketplaceSubscriptionStatus", "Active", case_sensitive=False), - test.check("properties.monitoringStatus", "Enabled", case_sensitive=False), - test.check("properties.provisioningState", "Succeeded", case_sensitive=False), - test.check("tags.Environment", "Dev2", case_sensitive=False), - ]) - - -# EXAMPLE: /ApiKeys/post/ApiKeys_GetDefaultKey -@try_manual -def step__apikeys_post_apikeys_getdefaultkey(test): - test.cmd('az datadog monitor get-default-key ' - '--monitor-name "{myMonitor}" ' - '--resource-group "{rg}"', - checks=[ - test.check("key", "1111111111111111aaaaaaaaaaaaaaaa", case_sensitive=False), - ]) - - -# EXAMPLE: /ApiKeys/post/ApiKeys_List -@try_manual -def step__apikeys_post_apikeys_list(test): - test.cmd('az datadog monitor list-api-key ' - '--monitor-name "{myMonitor}" ' - '--resource-group "{rg}"', - checks=[ - test.check('length(@)', 1), - ]) - - -# EXAMPLE: /ApiKeys/post/ApiKeys_SetDefaultKey -@try_manual -def step__apikeys_post_apikeys_setdefaultkey(test): - test.cmd('az datadog monitor set-default-key ' - '--monitor-name "{myMonitor}" ' - '--key "1111111111111111aaaaaaaaaaaaaaaa" ' - '--resource-group "{rg}"', - checks=[]) - - -# EXAMPLE: /Hosts/post/Hosts_List -@try_manual -def step__hosts_post_hosts_list(test): - test.cmd('az datadog monitor list-host ' - '--monitor-name "{myMonitor}" ' - '--resource-group "{rg}"', - checks=[]) - - -# EXAMPLE: /LinkedResources/post/LinkedResources_List -@try_manual -def step__linkedresources_post_linkedresources_list(test): - test.cmd('az datadog monitor list-linked-resource ' - '--monitor-name "{myMonitor}" ' - '--resource-group "{rg}"', - checks=[ - test.check('length(@)', 1), - ]) - - -# EXAMPLE: /MonitoredResources/post/MonitoredResources_List -@try_manual -def step__monitoredresources_post(test): - test.cmd('az datadog monitor list-monitored-resource ' - '--monitor-name "{myMonitor}" ' - '--resource-group "{rg}"', - checks=[]) - - -# EXAMPLE: /RefreshSetPassword/post/RefreshSetPassword_Get -@try_manual -def step__refreshsetpassword_post(test): - test.cmd('az datadog monitor refresh-set-password-link ' - '--monitor-name "{myMonitor}" ' - '--resource-group "{rg}"', - checks=[ - test.check("setPasswordLink", None), - ]) - - -# EXAMPLE: /SingleSignOnConfigurations/put/SingleSignOnConfigurations_CreateOrUpdate -@try_manual -def step__singlesignonconfigurations_put(test): - test.cmd('az datadog sso-config create ' - '--configuration-name "default" ' - '--monitor-name "{myMonitor}" ' - '--properties enterprise-app-id="ac754169-3489-42ae-bd06-8be89db12e58" single-sign-on-state="Enable" ' - '--resource-group "{rg}"', - checks=[]) - - -# EXAMPLE: /SingleSignOnConfigurations/get/SingleSignOnConfigurations_Get -@try_manual -def step__singlesignonconfigurations_get(test): - test.cmd('az datadog sso-config show ' - '--configuration-name "default" ' - '--monitor-name "{myMonitor}" ' - '--resource-group "{rg}"', - checks=[ - test.check("name", "default", case_sensitive=False), - test.check("type", "Microsoft.Datadog/monitors/singleSignOnConfigurations", case_sensitive=False), - ]) - - -# EXAMPLE: /SingleSignOnConfigurations/get/SingleSignOnConfigurations_List -@try_manual -def step__singlesignonconfigurations_get2(test): - test.cmd('az datadog sso-config list ' - '--monitor-name "{myMonitor}" ' - '--resource-group "{rg}"', - checks=[ - test.check('length(@)', 1), - ]) - - -# EXAMPLE: /TagRules/put/TagRules_CreateOrUpdate -@try_manual -def step__tagrules_put_tagrules_createorupdate(test): - test.cmd('az datadog tag-rule create ' - '--monitor-name "{myMonitor}" ' - '--log-rules-filtering-tags name="Environment" action="Include" value="Prod" ' - '--log-rules-filtering-tags name="Environment" action="Exclude" value="Dev" ' - '--send-aad-logs false ' - '--send-resource-logs true ' - '--send-subscription-logs true ' - '--resource-group "{rg}" ' - '--rule-set-name "default"', - checks=[ - test.check("name", "default", case_sensitive=False), - test.check("type", "Microsoft.Datadog/monitors/tagRules", case_sensitive=False), - ]) - - -# EXAMPLE: /TagRules/get/TagRules_Get -@try_manual -def step__tagrules_get_tagrules_get(test): - test.cmd('az datadog tag-rule show ' - '--monitor-name "{myMonitor}" ' - '--resource-group "{rg}" ' - '--rule-set-name "default"', - checks=[ - test.check("name", "default", case_sensitive=False), - test.check("type", "Microsoft.Datadog/monitors/tagRules", case_sensitive=False), - ]) - - -# EXAMPLE: /TagRules/get/TagRules_List -@try_manual -def step__tagrules_get_tagrules_list(test): - test.cmd('az datadog tag-rule list ' - '--monitor-name "{myMonitor}" ' - '--resource-group "{rg}"', - checks=[ - test.check('length(@)', 1), - ]) - - -# EXAMPLE: /Monitors/delete/Monitors_Delete -@try_manual -def step__monitors_delete_monitors_delete(test): - test.cmd('az datadog monitor delete -y ' - '--name "{myMonitor}" ' - '--resource-group "{rg}"', - checks=[]) - - -@try_manual -def step__terms_list(test): - test.cmd('az datadog terms list', - checks=[ - test.check('length(@)', 2) - ]) - - -@try_manual -def step__monitors_put_monitors_create_link(test): - with mock.patch('azure.cli.command_modules.role.custom._gen_guid', side_effect=test.create_guid): - test.cmd('az datadog monitor create ' - '--name "{myMonitor}" ' - '--sku-name "Linked" ' - '--datadog-organization-properties ' - 'api-key=XX ' - 'application-key=XX ' - '--location "East US 2 EUAP" ' - '--type "SystemAssigned" ' - '--user-info name="Alice" email-address="alice@microsoft.com" phone-number="123-456-7890" ' - '--tags Environment="Dev" ' - '--resource-group "{rg}"', - checks=[ - test.check("name", "{myMonitor}", case_sensitive=False), - test.check("sku.name", "Linked", case_sensitive=False), - test.check("location", "eastus2euap", case_sensitive=False), - test.check("properties.marketplaceSubscriptionStatus", "Active", case_sensitive=False), - test.check("properties.monitoringStatus", "Enabled", case_sensitive=False), - test.check("properties.provisioningState", "Succeeded", case_sensitive=False), - test.check("tags.Environment", "Dev", case_sensitive=False), - ]) - test.cmd('az datadog monitor wait --created ' - '--name "{myMonitor}" ' - '--resource-group "{rg}"', - checks=[]) - - -@try_manual -def cleanup(): +def cleanup_scenario(test, rg): pass -@try_manual -def call_scenario(test): - setup() - step__monitors_put_monitors_create(test) - step__monitors_get_monitors_get(test) - step__monitors_get_monitors_list(test) - step__monitors_get_monitors_listbyresourcegroup(test) - step__monitors_patch_monitors_update(test) - step__hosts_post_hosts_list(test) - step__linkedresources_post_linkedresources_list(test) - step__monitoredresources_post(test) - step__refreshsetpassword_post(test) - step__singlesignonconfigurations_put(test) - step__singlesignonconfigurations_get(test) - step__singlesignonconfigurations_get2(test) - step__tagrules_put_tagrules_createorupdate(test) - step__tagrules_get_tagrules_get(test) - step__tagrules_get_tagrules_list(test) - step__apikeys_post_apikeys_list(test) - step__apikeys_post_apikeys_setdefaultkey(test) - step__apikeys_post_apikeys_getdefaultkey(test) - step__monitors_delete_monitors_delete(test) - step__terms_list(test) - step__monitors_put_monitors_create_link(test) - cleanup() - - -@try_manual -class MicrosoftDatadogClientScenarioTest(ScenarioTest): - - @AllowLargeResponse() - @ResourceGroupPreparer(name_prefix='clitestdatadog_myResourceGroup'[:7], key='rg', parameter_name='rg') - def test_datadog(self): - +# Testcase: Scenario +@try_manual +def call_scenario(test, rg): + setup_scenario(test, rg) + step_terms_create(test, rg, checks=[]) + step_terms_list(test, rg, checks=[]) + step_monitor_create(test, rg, checks=[ + test.check("name", "{myMonitor}", case_sensitive=False), + test.check("sku.name", "free_Monthly", case_sensitive=False), + test.check("location", "West US", case_sensitive=False), + test.check("tags.Environment", "Dev", case_sensitive=False), + ]) + step_monitor_show(test, rg, checks=[ + test.check("name", "{myMonitor}", case_sensitive=False), + test.check("location", "West US", case_sensitive=False), + test.check("tags.Environment", "Dev", case_sensitive=False), + ]) + step_monitor_list(test, rg, checks=[ + test.check('length(@)', 1), + ]) + step_monitor_list2(test, rg, checks=[ + test.check('length(@)', 1), + ]) + step_monitor_update(test, rg, checks=[ + test.check("name", "{myMonitor}", case_sensitive=False), + test.check("sku.name", "free_Monthly", case_sensitive=False), + test.check("location", "West US", case_sensitive=False), + test.check("tags.Environment", "Dev", case_sensitive=False), + ]) + step_monitor_get_default_key(test, rg, checks=[]) + step_monitor_list_api_key(test, rg, checks=[]) + step_monitor_list_host(test, rg, checks=[]) + step_monitor_list_linked_resource(test, rg, checks=[]) + step_monitor_list_monitored_resource(test, rg, checks=[]) + step_monitor_refresh_set_password_link(test, rg, checks=[]) + step_monitor_set_default_key(test, rg, checks=[]) + step_sso_config_create(test, rg, checks=[]) + step_sso_config_show(test, rg, checks=[]) + step_sso_config_list(test, rg, checks=[]) + step_tag_rule_create(test, rg, checks=[]) + step_tag_rule_show(test, rg, checks=[]) + step_tag_rule_list(test, rg, checks=[]) + step_monitor_delete(test, rg, checks=[]) + cleanup_scenario(test, rg) + + +# Test class for Scenario +@try_manual +class DatadogScenarioTest(ScenarioTest): + + def __init__(self, *args, **kwargs): + super(DatadogScenarioTest, self).__init__(*args, **kwargs) self.kwargs.update({ 'myMonitor': 'myMonitor', }) - call_scenario(self) + + @ResourceGroupPreparer(name_prefix='clitestdatadog_myResourceGroup'[:7], key='rg', parameter_name='rg') + def test_datadog_Scenario(self, rg): + call_scenario(self, rg) calc_coverage(__file__) raise_if() + diff --git a/src/datadog/azext_datadog/vendored_sdks/datadog/aio/operations/_monitors_operations.py b/src/datadog/azext_datadog/vendored_sdks/datadog/aio/operations/_monitors_operations.py index 37d8af8b680..150bcfe5c32 100644 --- a/src/datadog/azext_datadog/vendored_sdks/datadog/aio/operations/_monitors_operations.py +++ b/src/datadog/azext_datadog/vendored_sdks/datadog/aio/operations/_monitors_operations.py @@ -80,7 +80,7 @@ def prepare_request(next_link=None): url = self.list_api_keys.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -151,7 +151,7 @@ async def get_default_key( url = self.get_default_key.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -216,7 +216,7 @@ async def set_default_key( url = self.set_default_key.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -287,7 +287,7 @@ def prepare_request(next_link=None): url = self.list_hosts.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -364,7 +364,7 @@ def prepare_request(next_link=None): url = self.list_linked_resources.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -441,7 +441,7 @@ def prepare_request(next_link=None): url = self.list_monitored_resources.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -584,7 +584,7 @@ def prepare_request(next_link=None): url = self.list_by_resource_group.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -654,7 +654,7 @@ async def get( url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -704,7 +704,7 @@ async def _create_initial( url = self._create_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -800,7 +800,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'), } @@ -838,7 +838,7 @@ async def _update_initial( url = self._update_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -934,7 +934,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'), } @@ -970,7 +970,7 @@ async def _delete_initial( url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -1045,7 +1045,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'), } @@ -1094,7 +1094,7 @@ async def refresh_set_password_link( url = self.refresh_set_password_link.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) diff --git a/src/datadog/azext_datadog/vendored_sdks/datadog/aio/operations/_single_sign_on_configurations_operations.py b/src/datadog/azext_datadog/vendored_sdks/datadog/aio/operations/_single_sign_on_configurations_operations.py index 79838a3df58..7354c59d22e 100644 --- a/src/datadog/azext_datadog/vendored_sdks/datadog/aio/operations/_single_sign_on_configurations_operations.py +++ b/src/datadog/azext_datadog/vendored_sdks/datadog/aio/operations/_single_sign_on_configurations_operations.py @@ -80,7 +80,7 @@ def prepare_request(next_link=None): url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -141,7 +141,7 @@ async def _create_or_update_initial( url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'), 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), } @@ -242,7 +242,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'), 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), } @@ -295,7 +295,7 @@ async def get( url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'), 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), } diff --git a/src/datadog/azext_datadog/vendored_sdks/datadog/aio/operations/_tag_rules_operations.py b/src/datadog/azext_datadog/vendored_sdks/datadog/aio/operations/_tag_rules_operations.py index 972b816ad93..ea0fc7f5686 100644 --- a/src/datadog/azext_datadog/vendored_sdks/datadog/aio/operations/_tag_rules_operations.py +++ b/src/datadog/azext_datadog/vendored_sdks/datadog/aio/operations/_tag_rules_operations.py @@ -78,7 +78,7 @@ def prepare_request(next_link=None): url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -156,7 +156,7 @@ async def create_or_update( url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'), 'ruleSetName': self._serialize.url("rule_set_name", rule_set_name, 'str'), } @@ -228,7 +228,7 @@ async def get( url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'), 'ruleSetName': self._serialize.url("rule_set_name", rule_set_name, 'str'), } diff --git a/src/datadog/azext_datadog/vendored_sdks/datadog/operations/_monitors_operations.py b/src/datadog/azext_datadog/vendored_sdks/datadog/operations/_monitors_operations.py index 0606c2e954c..b4cace632d7 100644 --- a/src/datadog/azext_datadog/vendored_sdks/datadog/operations/_monitors_operations.py +++ b/src/datadog/azext_datadog/vendored_sdks/datadog/operations/_monitors_operations.py @@ -85,7 +85,7 @@ def prepare_request(next_link=None): url = self.list_api_keys.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -157,7 +157,7 @@ def get_default_key( url = self.get_default_key.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -223,7 +223,7 @@ def set_default_key( url = self.set_default_key.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -295,7 +295,7 @@ def prepare_request(next_link=None): url = self.list_hosts.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -373,7 +373,7 @@ def prepare_request(next_link=None): url = self.list_linked_resources.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -451,7 +451,7 @@ def prepare_request(next_link=None): url = self.list_monitored_resources.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -596,7 +596,7 @@ def prepare_request(next_link=None): url = self.list_by_resource_group.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -667,7 +667,7 @@ def get( url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -718,7 +718,7 @@ def _create_initial( url = self._create_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -815,7 +815,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'), } @@ -854,7 +854,7 @@ def _update_initial( url = self._update_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -951,7 +951,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'), } @@ -988,7 +988,7 @@ def _delete_initial( url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -1064,7 +1064,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'), } @@ -1114,7 +1114,7 @@ def refresh_set_password_link( url = self.refresh_set_password_link.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) diff --git a/src/datadog/azext_datadog/vendored_sdks/datadog/operations/_single_sign_on_configurations_operations.py b/src/datadog/azext_datadog/vendored_sdks/datadog/operations/_single_sign_on_configurations_operations.py index 6f2e25ce942..dc978476665 100644 --- a/src/datadog/azext_datadog/vendored_sdks/datadog/operations/_single_sign_on_configurations_operations.py +++ b/src/datadog/azext_datadog/vendored_sdks/datadog/operations/_single_sign_on_configurations_operations.py @@ -85,7 +85,7 @@ def prepare_request(next_link=None): url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -147,7 +147,7 @@ def _create_or_update_initial( url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'), 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), } @@ -249,7 +249,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'), 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), } @@ -303,7 +303,7 @@ def get( url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'), 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), } diff --git a/src/datadog/azext_datadog/vendored_sdks/datadog/operations/_tag_rules_operations.py b/src/datadog/azext_datadog/vendored_sdks/datadog/operations/_tag_rules_operations.py index a9fb453770f..d192c2716ca 100644 --- a/src/datadog/azext_datadog/vendored_sdks/datadog/operations/_tag_rules_operations.py +++ b/src/datadog/azext_datadog/vendored_sdks/datadog/operations/_tag_rules_operations.py @@ -83,7 +83,7 @@ def prepare_request(next_link=None): url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -162,7 +162,7 @@ def create_or_update( url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'), 'ruleSetName': self._serialize.url("rule_set_name", rule_set_name, 'str'), } @@ -235,7 +235,7 @@ def get( url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'), 'ruleSetName': self._serialize.url("rule_set_name", rule_set_name, 'str'), } diff --git a/src/datadog/azext_datadog/vendored_sdks/datadog/py.typed b/src/datadog/azext_datadog/vendored_sdks/datadog/py.typed new file mode 100644 index 00000000000..e5aff4f83af --- /dev/null +++ b/src/datadog/azext_datadog/vendored_sdks/datadog/py.typed @@ -0,0 +1 @@ +# Marker file for PEP 561. \ No newline at end of file diff --git a/src/datadog/report.md b/src/datadog/report.md new file mode 100644 index 00000000000..1fce7601cc6 --- /dev/null +++ b/src/datadog/report.md @@ -0,0 +1,370 @@ +# Azure CLI Module Creation Report + +## EXTENSION +|CLI Extension|Command Groups| +|---------|------------| +|az datadog|[groups](#CommandGroups) + +## GROUPS +### Command groups in `az datadog` extension +|CLI Command Group|Group Swagger name|Commands| +|---------|------------|--------| +|az datadog terms|MarketplaceAgreements|[commands](#CommandsInMarketplaceAgreements)| +|az datadog monitor|Monitors|[commands](#CommandsInMonitors)| +|az datadog tag-rule|TagRules|[commands](#CommandsInTagRules)| +|az datadog sso-config|SingleSignOnConfigurations|[commands](#CommandsInSingleSignOnConfigurations)| + +## COMMANDS +### Commands in `az datadog monitor` group +|CLI Command|Operation Swagger name|Parameters|Examples| +|---------|------------|--------|-----------| +|[az datadog monitor list](#MonitorsListByResourceGroup)|ListByResourceGroup|[Parameters](#ParametersMonitorsListByResourceGroup)|[Example](#ExamplesMonitorsListByResourceGroup)| +|[az datadog monitor list](#MonitorsList)|List|[Parameters](#ParametersMonitorsList)|[Example](#ExamplesMonitorsList)| +|[az datadog monitor show](#MonitorsGet)|Get|[Parameters](#ParametersMonitorsGet)|[Example](#ExamplesMonitorsGet)| +|[az datadog monitor create](#MonitorsCreate)|Create|[Parameters](#ParametersMonitorsCreate)|[Example](#ExamplesMonitorsCreate)| +|[az datadog monitor update](#MonitorsUpdate)|Update|[Parameters](#ParametersMonitorsUpdate)|[Example](#ExamplesMonitorsUpdate)| +|[az datadog monitor delete](#MonitorsDelete)|Delete|[Parameters](#ParametersMonitorsDelete)|[Example](#ExamplesMonitorsDelete)| +|[az datadog monitor get-default-key](#MonitorsGetDefaultKey)|GetDefaultKey|[Parameters](#ParametersMonitorsGetDefaultKey)|[Example](#ExamplesMonitorsGetDefaultKey)| +|[az datadog monitor list-api-key](#MonitorsListApiKeys)|ListApiKeys|[Parameters](#ParametersMonitorsListApiKeys)|[Example](#ExamplesMonitorsListApiKeys)| +|[az datadog monitor list-host](#MonitorsListHosts)|ListHosts|[Parameters](#ParametersMonitorsListHosts)|[Example](#ExamplesMonitorsListHosts)| +|[az datadog monitor list-linked-resource](#MonitorsListLinkedResources)|ListLinkedResources|[Parameters](#ParametersMonitorsListLinkedResources)|[Example](#ExamplesMonitorsListLinkedResources)| +|[az datadog monitor list-monitored-resource](#MonitorsListMonitoredResources)|ListMonitoredResources|[Parameters](#ParametersMonitorsListMonitoredResources)|[Example](#ExamplesMonitorsListMonitoredResources)| +|[az datadog monitor refresh-set-password-link](#MonitorsRefreshSetPasswordLink)|RefreshSetPasswordLink|[Parameters](#ParametersMonitorsRefreshSetPasswordLink)|[Example](#ExamplesMonitorsRefreshSetPasswordLink)| +|[az datadog monitor set-default-key](#MonitorsSetDefaultKey)|SetDefaultKey|[Parameters](#ParametersMonitorsSetDefaultKey)|[Example](#ExamplesMonitorsSetDefaultKey)| + +### Commands in `az datadog sso-config` group +|CLI Command|Operation Swagger name|Parameters|Examples| +|---------|------------|--------|-----------| +|[az datadog sso-config list](#SingleSignOnConfigurationsList)|List|[Parameters](#ParametersSingleSignOnConfigurationsList)|[Example](#ExamplesSingleSignOnConfigurationsList)| +|[az datadog sso-config show](#SingleSignOnConfigurationsGet)|Get|[Parameters](#ParametersSingleSignOnConfigurationsGet)|[Example](#ExamplesSingleSignOnConfigurationsGet)| +|[az datadog sso-config create](#SingleSignOnConfigurationsCreateOrUpdate#Create)|CreateOrUpdate#Create|[Parameters](#ParametersSingleSignOnConfigurationsCreateOrUpdate#Create)|[Example](#ExamplesSingleSignOnConfigurationsCreateOrUpdate#Create)| +|[az datadog sso-config update](#SingleSignOnConfigurationsCreateOrUpdate#Update)|CreateOrUpdate#Update|[Parameters](#ParametersSingleSignOnConfigurationsCreateOrUpdate#Update)|Not Found| + +### Commands in `az datadog tag-rule` group +|CLI Command|Operation Swagger name|Parameters|Examples| +|---------|------------|--------|-----------| +|[az datadog tag-rule list](#TagRulesList)|List|[Parameters](#ParametersTagRulesList)|[Example](#ExamplesTagRulesList)| +|[az datadog tag-rule show](#TagRulesGet)|Get|[Parameters](#ParametersTagRulesGet)|[Example](#ExamplesTagRulesGet)| +|[az datadog tag-rule create](#TagRulesCreateOrUpdate#Create)|CreateOrUpdate#Create|[Parameters](#ParametersTagRulesCreateOrUpdate#Create)|[Example](#ExamplesTagRulesCreateOrUpdate#Create)| +|[az datadog tag-rule update](#TagRulesCreateOrUpdate#Update)|CreateOrUpdate#Update|[Parameters](#ParametersTagRulesCreateOrUpdate#Update)|Not Found| + +### Commands in `az datadog terms` group +|CLI Command|Operation Swagger name|Parameters|Examples| +|---------|------------|--------|-----------| +|[az datadog terms list](#MarketplaceAgreementsList)|List|[Parameters](#ParametersMarketplaceAgreementsList)|[Example](#ExamplesMarketplaceAgreementsList)| +|[az datadog terms create](#MarketplaceAgreementsCreateOrUpdate#Create)|CreateOrUpdate#Create|[Parameters](#ParametersMarketplaceAgreementsCreateOrUpdate#Create)|[Example](#ExamplesMarketplaceAgreementsCreateOrUpdate#Create)| +|[az datadog terms update](#MarketplaceAgreementsCreateOrUpdate#Update)|CreateOrUpdate#Update|[Parameters](#ParametersMarketplaceAgreementsCreateOrUpdate#Update)|Not Found| + + +## COMMAND DETAILS + +### group `az datadog monitor` +#### Command `az datadog monitor list` + +##### Example +``` +az datadog monitor list --resource-group "myResourceGroup" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The name of the resource group. The name is case insensitive.|resource_group_name|resourceGroupName| + +#### Command `az datadog monitor list` + +##### Example +``` +az datadog monitor list +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +#### Command `az datadog monitor show` + +##### Example +``` +az datadog monitor show --name "myMonitor" --resource-group "myResourceGroup" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The name of the resource group. The name is case insensitive.|resource_group_name|resourceGroupName| +|**--monitor-name**|string|Monitor resource name|monitor_name|monitorName| + +#### Command `az datadog monitor create` + +##### Example +``` +az datadog monitor create --monitor-name "myMonitor" --name "myMonitor" --location "West US" \ +--datadog-organization-properties name="myOrg" enterprise-app-id="00000000-0000-0000-0000-000000000000" \ +linking-auth-code="someAuthCode" linking-client-id="00000000-0000-0000-0000-000000000000" subscription="pro" \ +--user-info name="Alice" email-address="alice@microsoft.com" phone-number="123-456-7890" --name "free_Monthly" --tags \ +Environment="Dev" --resource-group "myResourceGroup" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The name of the resource group. The name is case insensitive.|resource_group_name|resourceGroupName| +|**--monitor-name**|string|Monitor resource name|monitor_name|monitorName| +|**--tags**|dictionary|Dictionary of |tags|tags| +|**--location**|string||location|location| +|**--type**|choice|Identity type|type|type| +|**--datadog-organization-properties**|object|Datadog organization properties|datadog_organization_properties|datadogOrganizationProperties| +|**--user-info**|object|User info|user_info|userInfo| +|**--name**|string|Name of the SKU.|name|name| + +#### Command `az datadog monitor update` + +##### Example +``` +az datadog monitor update --monitor-name "myMonitor" --tags Environment="Dev" --resource-group "myResourceGroup" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The name of the resource group. The name is case insensitive.|resource_group_name|resourceGroupName| +|**--monitor-name**|string|Monitor resource name|monitor_name|monitorName| +|**--tags**|dictionary|The new tags of the monitor resource.|tags|tags| +|**--name**|string|Name of the SKU.|name|name| + +#### Command `az datadog monitor delete` + +##### Example +``` +az datadog monitor delete --name "myMonitor" --resource-group "myResourceGroup" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The name of the resource group. The name is case insensitive.|resource_group_name|resourceGroupName| +|**--monitor-name**|string|Monitor resource name|monitor_name|monitorName| + +#### Command `az datadog monitor get-default-key` + +##### Example +``` +az datadog monitor get-default-key --name "myMonitor" --resource-group "myResourceGroup" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The name of the resource group. The name is case insensitive.|resource_group_name|resourceGroupName| +|**--monitor-name**|string|Monitor resource name|monitor_name|monitorName| + +#### Command `az datadog monitor list-api-key` + +##### Example +``` +az datadog monitor list-api-key --name "myMonitor" --resource-group "myResourceGroup" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The name of the resource group. The name is case insensitive.|resource_group_name|resourceGroupName| +|**--monitor-name**|string|Monitor resource name|monitor_name|monitorName| + +#### Command `az datadog monitor list-host` + +##### Example +``` +az datadog monitor list-host --name "myMonitor" --resource-group "myResourceGroup" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The name of the resource group. The name is case insensitive.|resource_group_name|resourceGroupName| +|**--monitor-name**|string|Monitor resource name|monitor_name|monitorName| + +#### Command `az datadog monitor list-linked-resource` + +##### Example +``` +az datadog monitor list-linked-resource --name "myMonitor" --resource-group "myResourceGroup" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The name of the resource group. The name is case insensitive.|resource_group_name|resourceGroupName| +|**--monitor-name**|string|Monitor resource name|monitor_name|monitorName| + +#### Command `az datadog monitor list-monitored-resource` + +##### Example +``` +az datadog monitor list-monitored-resource --name "myMonitor" --resource-group "myResourceGroup" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The name of the resource group. The name is case insensitive.|resource_group_name|resourceGroupName| +|**--monitor-name**|string|Monitor resource name|monitor_name|monitorName| + +#### Command `az datadog monitor refresh-set-password-link` + +##### Example +``` +az datadog monitor refresh-set-password-link --name "myMonitor" --resource-group "myResourceGroup" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The name of the resource group. The name is case insensitive.|resource_group_name|resourceGroupName| +|**--monitor-name**|string|Monitor resource name|monitor_name|monitorName| + +#### Command `az datadog monitor set-default-key` + +##### Example +``` +az datadog monitor set-default-key --monitor-name "myMonitor" --key "1111111111111111aaaaaaaaaaaaaaaa" \ +--resource-group "myResourceGroup" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The name of the resource group. The name is case insensitive.|resource_group_name|resourceGroupName| +|**--monitor-name**|string|Monitor resource name|monitor_name|monitorName| +|**--created-by**|string|The user that created the API key.|created_by|createdBy| +|**--name**|string|The name of the API key.|name|name| +|**--key**|string|The value of the API key.|key|key| +|**--created**|string|The time of creation of the API key.|created|created| + +### group `az datadog sso-config` +#### Command `az datadog sso-config list` + +##### Example +``` +az datadog sso-config list --monitor-name "myMonitor" --resource-group "myResourceGroup" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The name of the resource group. The name is case insensitive.|resource_group_name|resourceGroupName| +|**--monitor-name**|string|Monitor resource name|monitor_name|monitorName| + +#### Command `az datadog sso-config show` + +##### Example +``` +az datadog sso-config show --configuration-name "default" --monitor-name "myMonitor" --resource-group \ +"myResourceGroup" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The name of the resource group. The name is case insensitive.|resource_group_name|resourceGroupName| +|**--monitor-name**|string|Monitor resource name|monitor_name|monitorName| +|**--configuration-name**|string|Configuration name|configuration_name|configurationName| + +#### Command `az datadog sso-config create` + +##### Example +``` +az datadog sso-config create --configuration-name "default" --monitor-name "myMonitor" --properties \ +enterprise-app-id="00000000-0000-0000-0000-000000000000" single-sign-on-state="Enable" --resource-group \ +"myResourceGroup" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The name of the resource group. The name is case insensitive.|resource_group_name|resourceGroupName| +|**--monitor-name**|string|Monitor resource name|monitor_name|monitorName| +|**--configuration-name**|string|Configuration name|configuration_name|configurationName| +|**--properties**|object||properties|properties| + +#### Command `az datadog sso-config update` + +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The name of the resource group. The name is case insensitive.|resource_group_name|resourceGroupName| +|**--monitor-name**|string|Monitor resource name|monitor_name|monitorName| +|**--configuration-name**|string|Configuration name|configuration_name|configurationName| +|**--properties**|object||properties|properties| + +### group `az datadog tag-rule` +#### Command `az datadog tag-rule list` + +##### Example +``` +az datadog tag-rule list --monitor-name "myMonitor" --resource-group "myResourceGroup" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The name of the resource group. The name is case insensitive.|resource_group_name|resourceGroupName| +|**--monitor-name**|string|Monitor resource name|monitor_name|monitorName| + +#### Command `az datadog tag-rule show` + +##### Example +``` +az datadog tag-rule show --monitor-name "myMonitor" --resource-group "myResourceGroup" --rule-set-name "default" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The name of the resource group. The name is case insensitive.|resource_group_name|resourceGroupName| +|**--monitor-name**|string|Monitor resource name|monitor_name|monitorName| +|**--rule-set-name**|string|Rule set name|rule_set_name|ruleSetName| + +#### Command `az datadog tag-rule create` + +##### Example +``` +az datadog tag-rule create --monitor-name "myMonitor" --log-rules-filtering-tags name="Environment" action="Include" \ +value="Prod" --log-rules-filtering-tags name="Environment" action="Exclude" value="Dev" --send-aad-logs false \ +--send-resource-logs true --send-subscription-logs true --resource-group "myResourceGroup" --rule-set-name "default" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The name of the resource group. The name is case insensitive.|resource_group_name|resourceGroupName| +|**--monitor-name**|string|Monitor resource name|monitor_name|monitorName| +|**--rule-set-name**|string|Rule set name|rule_set_name|ruleSetName| +|**--filtering-tags**|array|List of filtering tags to be used for capturing metrics. If empty, all resources will be captured. If only Exclude action is specified, the rules will apply to the list of all available resources. If Include actions are specified, the rules will only include resources with the associated tags.|filtering_tags|filteringTags| +|**--send-aad-logs**|boolean|Flag specifying if AAD logs should be sent for the Monitor resource.|send_aad_logs|sendAadLogs| +|**--send-subscription-logs**|boolean|Flag specifying if Azure subscription logs should be sent for the Monitor resource.|send_subscription_logs|sendSubscriptionLogs| +|**--send-resource-logs**|boolean|Flag specifying if Azure resource logs should be sent for the Monitor resource.|send_resource_logs|sendResourceLogs| +|**--log-rules-filtering-tags**|array|List of filtering tags to be used for capturing logs. This only takes effect if SendResourceLogs flag is enabled. If empty, all resources will be captured. If only Exclude action is specified, the rules will apply to the list of all available resources. If Include actions are specified, the rules will only include resources with the associated tags.|log_rules_filtering_tags|filteringTags| + +#### Command `az datadog tag-rule update` + +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The name of the resource group. The name is case insensitive.|resource_group_name|resourceGroupName| +|**--monitor-name**|string|Monitor resource name|monitor_name|monitorName| +|**--rule-set-name**|string|Rule set name|rule_set_name|ruleSetName| +|**--filtering-tags**|array|List of filtering tags to be used for capturing metrics. If empty, all resources will be captured. If only Exclude action is specified, the rules will apply to the list of all available resources. If Include actions are specified, the rules will only include resources with the associated tags.|filtering_tags|filteringTags| +|**--send-aad-logs**|boolean|Flag specifying if AAD logs should be sent for the Monitor resource.|send_aad_logs|sendAadLogs| +|**--send-subscription-logs**|boolean|Flag specifying if Azure subscription logs should be sent for the Monitor resource.|send_subscription_logs|sendSubscriptionLogs| +|**--send-resource-logs**|boolean|Flag specifying if Azure resource logs should be sent for the Monitor resource.|send_resource_logs|sendResourceLogs| +|**--log-rules-filtering-tags**|array|List of filtering tags to be used for capturing logs. This only takes effect if SendResourceLogs flag is enabled. If empty, all resources will be captured. If only Exclude action is specified, the rules will apply to the list of all available resources. If Include actions are specified, the rules will only include resources with the associated tags.|log_rules_filtering_tags|filteringTags| + +### group `az datadog terms` +#### Command `az datadog terms list` + +##### Example +``` +az datadog terms list +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +#### Command `az datadog terms create` + +##### Example +``` +az datadog terms create --properties accepted=true +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--properties**|object|Represents the properties of the resource.|properties|properties| + +#### Command `az datadog terms update` + +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--properties**|object|Represents the properties of the resource.|properties|properties| diff --git a/src/datadog/setup.cfg b/src/datadog/setup.cfg index 8bfd5a12f85..2fdd96e5d39 100644 --- a/src/datadog/setup.cfg +++ b/src/datadog/setup.cfg @@ -1,4 +1 @@ -[egg_info] -tag_build = -tag_date = 0 - +#setup.cfg \ No newline at end of file diff --git a/src/datadog/setup.py b/src/datadog/setup.py index f97db8e8399..d25f729fc1f 100644 --- a/src/datadog/setup.py +++ b/src/datadog/setup.py @@ -10,7 +10,7 @@ from setuptools import setup, find_packages # HISTORY.rst entry. -VERSION = '0.1.1' +VERSION = '0.1.0' try: from azext_datadog.manual.version import VERSION except ImportError: