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

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/datadog/azext_datadog/azext_metadata.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"azext.isExperimental": true,
"azext.minCliCoreVersion": "2.11.0"
"azext.minCliCoreVersion": "2.15.0"
}
20 changes: 12 additions & 8 deletions src/datadog/azext_datadog/generated/_client_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,38 +11,42 @@

def cf_datadog_cl(cli_ctx, *_):
from azure.cli.core.commands.client_factory import get_mgmt_service_client
from ..vendored_sdks.datadog import MicrosoftDatadogClient
from azext_datadog.vendored_sdks.datadog import MicrosoftDatadogClient
return get_mgmt_service_client(cli_ctx,
MicrosoftDatadogClient)


def cf_marketplace_agreement(cli_ctx, *_):
return cf_datadog_cl(cli_ctx).marketplace_agreements


def cf_api_key(cli_ctx, *_):
return cf_datadog_cl(cli_ctx).api_key
return cf_datadog_cl(cli_ctx).api_keys


def cf_host(cli_ctx, *_):
return cf_datadog_cl(cli_ctx).host
return cf_datadog_cl(cli_ctx).hosts


def cf_linked_resource(cli_ctx, *_):
return cf_datadog_cl(cli_ctx).linked_resource
return cf_datadog_cl(cli_ctx).linked_resources


def cf_monitored_resource(cli_ctx, *_):
return cf_datadog_cl(cli_ctx).monitored_resource
return cf_datadog_cl(cli_ctx).monitored_resources


def cf_monitor(cli_ctx, *_):
return cf_datadog_cl(cli_ctx).monitor
return cf_datadog_cl(cli_ctx).monitors


def cf_refresh_set_password(cli_ctx, *_):
return cf_datadog_cl(cli_ctx).refresh_set_password


def cf_tag_rule(cli_ctx, *_):
return cf_datadog_cl(cli_ctx).tag_rule
return cf_datadog_cl(cli_ctx).tag_rules


def cf_single_sign_on_configuration(cli_ctx, *_):
return cf_datadog_cl(cli_ctx).single_sign_on_configuration
return cf_datadog_cl(cli_ctx).single_sign_on_configurations
129 changes: 88 additions & 41 deletions src/datadog/azext_datadog/generated/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,48 @@
from knack.help_files import helps


helps['datadog marketplace-agreement'] = """
type: group
short-summary: Manage marketplace agreement with datadog
"""

helps['datadog marketplace-agreement list'] = """
type: command
short-summary: "List Datadog marketplace agreements in the subscription."
examples:
- name: MarketplaceAgreements_List
text: |-
az datadog marketplace-agreement list
"""

helps['datadog marketplace-agreement create'] = """
type: command
short-summary: "Create Datadog marketplace agreement in the subscription."
parameters:
- name: --properties
short-summary: "Represents the properties of the resource."
long-summary: |
Usage: --properties publisher=XX product=XX plan=XX license-text-link=XX privacy-policy-link=XX \
retrieve-datetime=XX signature=XX accepted=XX

publisher: Publisher identifier string.
product: Product identifier string.
plan: Plan identifier string.
license-text-link: Link to HTML with Microsoft and Publisher terms.
privacy-policy-link: Link to the privacy policy of the publisher.
retrieve-datetime: Date and time in UTC of when the terms were accepted. This is empty if Accepted is \
false.
signature: Terms signature.
accepted: If any version of the terms have been accepted, otherwise false.
examples:
- name: MarketplaceAgreements_Create
text: |-
az datadog marketplace-agreement create --properties accepted=true
"""

helps['datadog api-key'] = """
type: group
short-summary: datadog api-key
short-summary: Manage api key with datadog
"""

helps['datadog api-key list'] = """
Expand Down Expand Up @@ -47,7 +86,7 @@

helps['datadog host'] = """
type: group
short-summary: datadog host
short-summary: Manage host with datadog
"""

helps['datadog host list'] = """
Expand All @@ -61,7 +100,7 @@

helps['datadog linked-resource'] = """
type: group
short-summary: datadog linked-resource
short-summary: Manage linked resource with datadog
"""

helps['datadog linked-resource list'] = """
Expand All @@ -75,7 +114,7 @@

helps['datadog monitored-resource'] = """
type: group
short-summary: datadog monitored-resource
short-summary: Manage monitored resource with datadog
"""

helps['datadog monitored-resource list'] = """
Expand All @@ -89,16 +128,20 @@

helps['datadog monitor'] = """
type: group
short-summary: datadog monitor
short-summary: Manage monitor with datadog
"""

helps['datadog monitor list'] = """
type: command
short-summary: "List all monitors under the specified subscription."
short-summary: "List all monitors under the specified resource group. And List all monitors under the specified \
subscription."
examples:
- name: Monitors_ListByResourceGroup
text: |-
az datadog monitor list --resource-group "myResourceGroup"
- name: Monitors_List
text: |-
az datadog monitor list
"""

helps['datadog monitor show'] = """
Expand All @@ -115,13 +158,15 @@
short-summary: "Create a monitor resource."
parameters:
- name: --datadog-organization-properties
short-summary: "Datadog organization properties"
long-summary: |
Usage: --datadog-organization-properties linking-auth-code=XX linking-client-id=XX enterprise-app-id=XX

linking-auth-code: The auth code used to linking to an existing datadog organization.
linking-client-id: The client_id from an existing in exchange for an auth token to link organization.
enterprise-app-id: The Id of the Enterprise App used for Single sign on.
- name: --user-info
short-summary: "User info"
long-summary: |
Usage: --user-info name=XX email-address=XX phone-number=XX

Expand All @@ -131,11 +176,11 @@
examples:
- name: Monitors_Create
text: |-
az datadog monitor create --name "myMonitor" --location "West US 2" \
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" \
--monitoring-status "Enabled" --user-info name="Alice" email-address="[email protected]" phone-number="123-456-7890" \
--sku-name "drawdown_testing_20200904_Monthly" --tags Environment="Dev" --resource-group "myResourceGroup"
--user-info name="Alice" email-address="[email protected]" phone-number="123-456-7890" --name "free_Monthly" --tags \
Environment="Dev" --resource-group "myResourceGroup"
"""

helps['datadog monitor update'] = """
Expand All @@ -144,8 +189,8 @@
examples:
- name: Monitors_Update
text: |-
az datadog monitor update --name "myMonitor" --monitoring-status "Enabled" --tags Environment="Dev" \
--resource-group "myResourceGroup"
az datadog monitor update --name "myMonitor" --tags Environment="Dev" --resource-group \
"myResourceGroup"
"""

helps['datadog monitor delete'] = """
Expand All @@ -171,7 +216,7 @@

helps['datadog set-password-link'] = """
type: group
short-summary: datadog set-password-link
short-summary: Manage set password link with datadog
"""

helps['datadog set-password-link get'] = """
Expand All @@ -185,7 +230,7 @@

helps['datadog tag-rule'] = """
type: group
short-summary: datadog tag-rule
short-summary: Manage tag rule with datadog
"""

helps['datadog tag-rule list'] = """
Expand All @@ -211,18 +256,18 @@
type: command
short-summary: "Create a tag rule set for a given monitor resource."
parameters:
- name: --metric-rules-filtering-tags
- name: --filtering-tags
short-summary: "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."
long-summary: |
Usage: --metric-rules-filtering-tags name=XX value=XX action=XX
Usage: --filtering-tags name=XX value=XX action=XX

name: The name (also known as the key) of the tag.
value: The value of the tag.
action: Valid actions for a filtering tag. Exclusion takes priority over inclusion.

Multiple actions can be specified by using more than one --metric-rules-filtering-tags argument.
Multiple actions can be specified by using more than one --filtering-tags argument.
- name: --log-rules-filtering-tags
short-summary: "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 \
Expand All @@ -241,26 +286,26 @@
text: |-
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" \
--log-rules-send-aad-logs false --log-rules-send-resource-logs true --log-rules-send-subscription-logs true \
--resource-group "myResourceGroup" --rule-set-name "default"
--send-aad-logs false --send-resource-logs true --send-subscription-logs true --resource-group "myResourceGroup" \
--rule-set-name "default"
"""

helps['datadog tag-rule update'] = """
type: command
short-summary: "Update a tag rule set for a given monitor resource."
parameters:
- name: --metric-rules-filtering-tags
- name: --filtering-tags
short-summary: "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."
long-summary: |
Usage: --metric-rules-filtering-tags name=XX value=XX action=XX
Usage: --filtering-tags name=XX value=XX action=XX

name: The name (also known as the key) of the tag.
value: The value of the tag.
action: Valid actions for a filtering tag. Exclusion takes priority over inclusion.

Multiple actions can be specified by using more than one --metric-rules-filtering-tags argument.
Multiple actions can be specified by using more than one --filtering-tags argument.
- name: --log-rules-filtering-tags
short-summary: "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 \
Expand All @@ -278,7 +323,7 @@

helps['datadog sso-config'] = """
type: group
short-summary: datadog sso-config
short-summary: Manage sso config with datadog
"""

helps['datadog sso-config list'] = """
Expand All @@ -287,8 +332,7 @@
examples:
- name: SingleSignOnConfigurations_List
text: |-
az datadog sso-config list --monitor-name "myMonitor" --resource-group \
"myResourceGroup"
az datadog sso-config list --monitor-name "myMonitor" --resource-group "myResourceGroup"
"""

helps['datadog sso-config show'] = """
Expand All @@ -297,8 +341,8 @@
examples:
- name: SingleSignOnConfigurations_Get
text: |-
az datadog sso-config show --configuration-name "default" --monitor-name "myMonitor" \
--resource-group "myResourceGroup"
az datadog sso-config show --configuration-name "default" --monitor-name "myMonitor" --resource-group \
"myResourceGroup"
"""

helps['datadog sso-config create'] = """
Expand All @@ -307,37 +351,40 @@
parameters:
- name: --properties
long-summary: |
Usage: --properties single-sign-on-state=XX enterprise-app-id=XX single-sign-on-url=XX
Usage: --properties single-sign-on-state=XX enterprise-app-id=XX

single-sign-on-state: Various states of the SSO resource
enterprise-app-id: The Id of the Enterprise App used for Single sign-on.
single-sign-on-url: The login URL specific to this Datadog Organization.
examples:
- name: SingleSignOnConfigurations_CreateOrUpdate
text: |-
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"
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"
"""

helps['datadog sso-config update'] = """
type: command
short-summary: "Configures single-sign-on for this resource."
parameters:
- name: --properties
long-summary: |
Usage: --properties single-sign-on-state=XX enterprise-app-id=XX

single-sign-on-state: Various states of the SSO resource
enterprise-app-id: The Id of the Enterprise App used for Single sign-on.
"""

helps['datadog sso-config wait'] = """
type: command
short-summary: Place the CLI in a waiting state until a condition of the datadog sso-config is \
met.
short-summary: Place the CLI in a waiting state until a condition of the datadog sso-config is met.
examples:
- name: Pause executing next line of CLI script until the datadog sso-config is successfully \
created.
- name: Pause executing next line of CLI script until the datadog sso-config is successfully created.
text: |-
az datadog sso-config wait --configuration-name "default" --monitor-name "myMonitor" \
--resource-group "myResourceGroup" --created
- name: Pause executing next line of CLI script until the datadog sso-config is successfully \
updated.
az datadog sso-config wait --configuration-name "default" --monitor-name "myMonitor" --resource-group \
"myResourceGroup" --created
- name: Pause executing next line of CLI script until the datadog sso-config is successfully updated.
text: |-
az datadog sso-config wait --configuration-name "default" --monitor-name "myMonitor" \
--resource-group "myResourceGroup" --updated
az datadog sso-config wait --configuration-name "default" --monitor-name "myMonitor" --resource-group \
"myResourceGroup" --updated
"""
Loading