Skip to content

Commit a309a40

Browse files
author
SDKAuto
committed
CodeGen from PR 11639 in Azure/azure-rest-api-specs
Merge b4b64803111a6a3c3e13503104b6c7b35b6f9ec7 into 7c8fd7f
1 parent 1bbc4f0 commit a309a40

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+3718
-376
lines changed

src/datadog/azext_datadog/generated/_client_factory.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ def cf_datadog_cl(cli_ctx, *_):
1616
MicrosoftDatadogClient)
1717

1818

19+
def cf_marketplace_agreement(cli_ctx, *_):
20+
return cf_datadog_cl(cli_ctx).marketplace_agreement
21+
22+
1923
def cf_api_key(cli_ctx, *_):
2024
return cf_datadog_cl(cli_ctx).api_key
2125

@@ -36,13 +40,13 @@ def cf_monitor(cli_ctx, *_):
3640
return cf_datadog_cl(cli_ctx).monitor
3741

3842

39-
def cf_refresh_set_password(cli_ctx, *_):
43+
def cf_set_password_link(cli_ctx, *_):
4044
return cf_datadog_cl(cli_ctx).refresh_set_password
4145

4246

4347
def cf_tag_rule(cli_ctx, *_):
4448
return cf_datadog_cl(cli_ctx).tag_rule
4549

4650

47-
def cf_single_sign_on_configuration(cli_ctx, *_):
51+
def cf_sso_config(cli_ctx, *_):
4852
return cf_datadog_cl(cli_ctx).single_sign_on_configuration

src/datadog/azext_datadog/generated/_help.py

Lines changed: 75 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,45 @@
1212
from knack.help_files import helps
1313

1414

15+
helps['datadog marketplace-agreement'] = """
16+
type: group
17+
short-summary: datadog marketplace-agreement
18+
"""
19+
20+
helps['datadog marketplace-agreement list'] = """
21+
type: command
22+
short-summary: "List Datadog marketplace agreements in the subscription."
23+
examples:
24+
- name: MarketplaceAgreements_List
25+
text: |-
26+
az datadog marketplace-agreement list
27+
"""
28+
29+
helps['datadog marketplace-agreement create'] = """
30+
type: command
31+
short-summary: "Create Datadog marketplace agreement in the subscription."
32+
parameters:
33+
- name: --properties
34+
short-summary: "Represents the properties of the resource."
35+
long-summary: |
36+
Usage: --properties publisher=XX product=XX plan=XX license-text-link=XX privacy-policy-link=XX \
37+
retrieve-datetime=XX signature=XX accepted=XX
38+
39+
publisher: Publisher identifier string.
40+
product: Product identifier string.
41+
plan: Plan identifier string.
42+
license-text-link: Link to HTML with Microsoft and Publisher terms.
43+
privacy-policy-link: Link to the privacy policy of the publisher.
44+
retrieve-datetime: Date and time in UTC of when the terms were accepted. This is empty if Accepted is \
45+
false.
46+
signature: Terms signature.
47+
accepted: If any version of the terms have been accepted, otherwise false.
48+
examples:
49+
- name: MarketplaceAgreements_Create
50+
text: |-
51+
az datadog marketplace-agreement create --properties accepted=true
52+
"""
53+
1554
helps['datadog api-key'] = """
1655
type: group
1756
short-summary: datadog api-key
@@ -94,11 +133,15 @@
94133

95134
helps['datadog monitor list'] = """
96135
type: command
97-
short-summary: "List all monitors under the specified subscription."
136+
short-summary: "List all monitors under the specified resource group. And List all monitors under the specified \
137+
subscription."
98138
examples:
99139
- name: Monitors_ListByResourceGroup
100140
text: |-
101141
az datadog monitor list --resource-group "myResourceGroup"
142+
- name: Monitors_List
143+
text: |-
144+
az datadog monitor list
102145
"""
103146

104147
helps['datadog monitor show'] = """
@@ -115,13 +158,15 @@
115158
short-summary: "Create a monitor resource."
116159
parameters:
117160
- name: --datadog-organization-properties
161+
short-summary: "Datadog organization properties"
118162
long-summary: |
119163
Usage: --datadog-organization-properties linking-auth-code=XX linking-client-id=XX enterprise-app-id=XX
120164
121165
linking-auth-code: The auth code used to linking to an existing datadog organization.
122166
linking-client-id: The client_id from an existing in exchange for an auth token to link organization.
123167
enterprise-app-id: The Id of the Enterprise App used for Single sign on.
124168
- name: --user-info
169+
short-summary: "User info"
125170
long-summary: |
126171
Usage: --user-info name=XX email-address=XX phone-number=XX
127172
@@ -131,11 +176,11 @@
131176
examples:
132177
- name: Monitors_Create
133178
text: |-
134-
az datadog monitor create --name "myMonitor" --location "West US 2" \
179+
az datadog monitor create --name "myMonitor" --sku-name "myMonitor" --location "West US" \
135180
--datadog-organization-properties name="myOrg" enterprise-app-id="00000000-0000-0000-0000-000000000000" \
136181
linking-auth-code="someAuthCode" linking-client-id="00000000-0000-0000-0000-000000000000" subscription="pro" \
137-
--monitoring-status "Enabled" --user-info name="Alice" email-address="alice@microsoft.com" phone-number="123-456-7890" \
138-
--sku-name "drawdown_testing_20200904_Monthly" --tags Environment="Dev" --resource-group "myResourceGroup"
182+
--user-info name="Alice" email-address="alice@microsoft.com" phone-number="123-456-7890" --sku-name "free_Monthly" \
183+
--tags Environment="Dev" --resource-group "myResourceGroup"
139184
"""
140185

141186
helps['datadog monitor update'] = """
@@ -144,8 +189,8 @@
144189
examples:
145190
- name: Monitors_Update
146191
text: |-
147-
az datadog monitor update --name "myMonitor" --monitoring-status "Enabled" --tags Environment="Dev" \
148-
--resource-group "myResourceGroup"
192+
az datadog monitor update --name "myMonitor" --tags Environment="Dev" --resource-group \
193+
"myResourceGroup"
149194
"""
150195

151196
helps['datadog monitor delete'] = """
@@ -223,26 +268,12 @@
223268
action: Valid actions for a filtering tag. Exclusion takes priority over inclusion.
224269
225270
Multiple actions can be specified by using more than one --metric-rules-filtering-tags argument.
226-
- name: --log-rules-filtering-tags
227-
short-summary: "List of filtering tags to be used for capturing logs. This only takes effect if \
228-
SendResourceLogs flag is enabled. If empty, all resources will be captured. If only Exclude action is specified, the \
229-
rules will apply to the list of all available resources. If Include actions are specified, the rules will only include \
230-
resources with the associated tags."
231-
long-summary: |
232-
Usage: --log-rules-filtering-tags name=XX value=XX action=XX
233-
234-
name: The name (also known as the key) of the tag.
235-
value: The value of the tag.
236-
action: Valid actions for a filtering tag. Exclusion takes priority over inclusion.
237-
238-
Multiple actions can be specified by using more than one --log-rules-filtering-tags argument.
239271
examples:
240272
- name: TagRules_CreateOrUpdate
241273
text: |-
242-
az datadog tag-rule create --monitor-name "myMonitor" --log-rules-filtering-tags name="Environment" \
243-
action="Include" value="Prod" --log-rules-filtering-tags name="Environment" action="Exclude" value="Dev" \
244-
--log-rules-send-aad-logs false --log-rules-send-resource-logs true --log-rules-send-subscription-logs true \
245-
--resource-group "myResourceGroup" --rule-set-name "default"
274+
az datadog tag-rule create --monitor-name "myMonitor" --log-rules-send-aad-logs false \
275+
--log-rules-send-resource-logs true --log-rules-send-subscription-logs true --resource-group "myResourceGroup" \
276+
--rule-set-name "default"
246277
"""
247278

248279
helps['datadog tag-rule update'] = """
@@ -261,19 +292,6 @@
261292
action: Valid actions for a filtering tag. Exclusion takes priority over inclusion.
262293
263294
Multiple actions can be specified by using more than one --metric-rules-filtering-tags argument.
264-
- name: --log-rules-filtering-tags
265-
short-summary: "List of filtering tags to be used for capturing logs. This only takes effect if \
266-
SendResourceLogs flag is enabled. If empty, all resources will be captured. If only Exclude action is specified, the \
267-
rules will apply to the list of all available resources. If Include actions are specified, the rules will only include \
268-
resources with the associated tags."
269-
long-summary: |
270-
Usage: --log-rules-filtering-tags name=XX value=XX action=XX
271-
272-
name: The name (also known as the key) of the tag.
273-
value: The value of the tag.
274-
action: Valid actions for a filtering tag. Exclusion takes priority over inclusion.
275-
276-
Multiple actions can be specified by using more than one --log-rules-filtering-tags argument.
277295
"""
278296

279297
helps['datadog sso-config'] = """
@@ -287,8 +305,7 @@
287305
examples:
288306
- name: SingleSignOnConfigurations_List
289307
text: |-
290-
az datadog sso-config list --monitor-name "myMonitor" --resource-group \
291-
"myResourceGroup"
308+
az datadog sso-config list --monitor-name "myMonitor" --resource-group "myResourceGroup"
292309
"""
293310

294311
helps['datadog sso-config show'] = """
@@ -297,8 +314,8 @@
297314
examples:
298315
- name: SingleSignOnConfigurations_Get
299316
text: |-
300-
az datadog sso-config show --configuration-name "default" --monitor-name "myMonitor" \
301-
--resource-group "myResourceGroup"
317+
az datadog sso-config show --configuration-name "default" --monitor-name "myMonitor" --resource-group \
318+
"myResourceGroup"
302319
"""
303320

304321
helps['datadog sso-config create'] = """
@@ -315,29 +332,34 @@
315332
examples:
316333
- name: SingleSignOnConfigurations_CreateOrUpdate
317334
text: |-
318-
az datadog sso-config create --configuration-name "default" --monitor-name \
319-
"myMonitor" --properties enterprise-app-id="00000000-0000-0000-0000-000000000000" single-sign-on-state="Enable" \
320-
--resource-group "myResourceGroup"
335+
az datadog sso-config create --configuration-name "default" --monitor-name "myMonitor" --properties \
336+
enterprise-app-id="00000000-0000-0000-0000-000000000000" single-sign-on-state="Enable" --resource-group \
337+
"myResourceGroup"
321338
"""
322339

323340
helps['datadog sso-config update'] = """
324341
type: command
325342
short-summary: "Configures single-sign-on for this resource."
343+
parameters:
344+
- name: --properties
345+
long-summary: |
346+
Usage: --properties single-sign-on-state=XX enterprise-app-id=XX single-sign-on-url=XX
347+
348+
single-sign-on-state: Various states of the SSO resource
349+
enterprise-app-id: The Id of the Enterprise App used for Single sign-on.
350+
single-sign-on-url: The login URL specific to this Datadog Organization.
326351
"""
327352

328353
helps['datadog sso-config wait'] = """
329354
type: command
330-
short-summary: Place the CLI in a waiting state until a condition of the datadog sso-config is \
331-
met.
355+
short-summary: Place the CLI in a waiting state until a condition of the datadog sso-config is met.
332356
examples:
333-
- name: Pause executing next line of CLI script until the datadog sso-config is successfully \
334-
created.
357+
- name: Pause executing next line of CLI script until the datadog sso-config is successfully created.
335358
text: |-
336-
az datadog sso-config wait --configuration-name "default" --monitor-name "myMonitor" \
337-
--resource-group "myResourceGroup" --created
338-
- name: Pause executing next line of CLI script until the datadog sso-config is successfully \
339-
updated.
359+
az datadog sso-config wait --configuration-name "default" --monitor-name "myMonitor" --resource-group \
360+
"myResourceGroup" --created
361+
- name: Pause executing next line of CLI script until the datadog sso-config is successfully updated.
340362
text: |-
341-
az datadog sso-config wait --configuration-name "default" --monitor-name "myMonitor" \
342-
--resource-group "myResourceGroup" --updated
363+
az datadog sso-config wait --configuration-name "default" --monitor-name "myMonitor" --resource-group \
364+
"myResourceGroup" --updated
343365
"""

src/datadog/azext_datadog/generated/_params.py

Lines changed: 10 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,20 @@
1919
)
2020
from azure.cli.core.commands.validators import get_default_location_from_resource_group
2121
from azext_datadog.action import (
22+
AddMarketplaceagreementsProperties,
2223
AddDatadogOrganizationProperties,
2324
AddUserInfo,
2425
AddMetricRulesFilteringTags,
25-
AddLogRulesFilteringTags,
26-
AddProperties
26+
AddSinglesignonconfigurationsProperties
2727
)
2828

2929

3030
def load_arguments(self, _):
3131

32+
with self.argument_context('datadog marketplace-agreement create') as c:
33+
c.argument('properties', action=AddMarketplaceagreementsProperties, nargs='*', help='Represents the properties '
34+
'of the resource.')
35+
3236
with self.argument_context('datadog api-key list') as c:
3337
c.argument('resource_group_name', resource_group_name_type)
3438
c.argument('monitor_name', type=str, help='Monitor resource name')
@@ -73,16 +77,8 @@ def load_arguments(self, _):
7377
c.argument('location', arg_type=get_location_type(self.cli_ctx),
7478
validator=get_default_location_from_resource_group)
7579
c.argument('identity_type', arg_type=get_enum_type(['SystemAssigned', 'UserAssigned']), help='Identity type')
76-
c.argument('provisioning_state', arg_type=get_enum_type(['Accepted', 'Creating', 'Updating', 'Deleting',
77-
'Succeeded', 'Failed', 'Canceled', 'Deleted',
78-
'NotSpecified']), help='Provisioning state')
79-
c.argument('monitoring_status', arg_type=get_enum_type(['Enabled', 'Disabled']), help='Flag specifying if the '
80-
'resource monitoring is enabled or disabled.')
81-
c.argument('marketplace_subscription_status', arg_type=get_enum_type(['Active', 'Suspended']), help='Flag '
82-
'specifying the Marketplace Subscription Status of the resource. If payment is not made in time, '
83-
'the resource will go in Suspended state.')
84-
c.argument('datadog_organization_properties', action=AddDatadogOrganizationProperties, nargs='*',
85-
help='Datadog organization properties')
80+
c.argument('datadog_organization_properties', action=AddDatadogOrganizationProperties, nargs='*', help=''
81+
'Datadog organization properties')
8682
c.argument('user_info', action=AddUserInfo, nargs='*', help='User info')
8783
c.argument('sku_name', type=str, help='Name of the SKU.')
8884

@@ -91,8 +87,6 @@ def load_arguments(self, _):
9187
c.argument('monitor_name', options_list=['--name', '-n', '--monitor-name'], type=str, help='Monitor resource '
9288
'name', id_part='name')
9389
c.argument('tags', tags_type)
94-
c.argument('monitoring_status', arg_type=get_enum_type(['Enabled', 'Disabled']), help='Flag specifying if the '
95-
'resource monitoring is enabled or disabled.')
9690

9791
with self.argument_context('datadog monitor delete') as c:
9892
c.argument('resource_group_name', resource_group_name_type)
@@ -131,11 +125,6 @@ def load_arguments(self, _):
131125
'subscription logs should be sent for the Monitor resource.')
132126
c.argument('log_rules_send_resource_logs', arg_type=get_three_state_flag(), help='Flag specifying if Azure '
133127
'resource logs should be sent for the Monitor resource.')
134-
c.argument('log_rules_filtering_tags', action=AddLogRulesFilteringTags, nargs='*', help='List of filtering '
135-
'tags to be used for capturing logs. This only takes effect if SendResourceLogs flag is enabled. If '
136-
'empty, all resources will be captured. If only Exclude action is specified, the rules will apply '
137-
'to the list of all available resources. If Include actions are specified, the rules will only '
138-
'include resources with the associated tags.')
139128

140129
with self.argument_context('datadog tag-rule update') as c:
141130
c.argument('resource_group_name', resource_group_name_type)
@@ -151,11 +140,6 @@ def load_arguments(self, _):
151140
'subscription logs should be sent for the Monitor resource.')
152141
c.argument('log_rules_send_resource_logs', arg_type=get_three_state_flag(), help='Flag specifying if Azure '
153142
'resource logs should be sent for the Monitor resource.')
154-
c.argument('log_rules_filtering_tags', action=AddLogRulesFilteringTags, nargs='*', help='List of filtering '
155-
'tags to be used for capturing logs. This only takes effect if SendResourceLogs flag is enabled. If '
156-
'empty, all resources will be captured. If only Exclude action is specified, the rules will apply '
157-
'to the list of all available resources. If Include actions are specified, the rules will only '
158-
'include resources with the associated tags.')
159143

160144
with self.argument_context('datadog sso-config list') as c:
161145
c.argument('resource_group_name', resource_group_name_type)
@@ -170,13 +154,13 @@ def load_arguments(self, _):
170154
c.argument('resource_group_name', resource_group_name_type)
171155
c.argument('monitor_name', type=str, help='Monitor resource name')
172156
c.argument('configuration_name', type=str, help='Configuration name')
173-
c.argument('properties', action=AddProperties, nargs='*', help='')
157+
c.argument('properties', action=AddSinglesignonconfigurationsProperties, nargs='*', help='')
174158

175159
with self.argument_context('datadog sso-config update') as c:
176160
c.argument('resource_group_name', resource_group_name_type)
177161
c.argument('monitor_name', type=str, help='Monitor resource name', id_part='name')
178162
c.argument('configuration_name', type=str, help='Configuration name', id_part='child_name_1')
179-
c.argument('properties', action=AddProperties, nargs='*', help='')
163+
c.argument('properties', action=AddSinglesignonconfigurationsProperties, nargs='*', help='')
180164

181165
with self.argument_context('datadog sso-config wait') as c:
182166
c.argument('resource_group_name', resource_group_name_type)

0 commit comments

Comments
 (0)