Skip to content
Merged
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
4 changes: 4 additions & 0 deletions src/dynatrace/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
Release History
===============

1.1.1
++++++
* Update the CLI command documentation

1.1.0
++++++
* Add: metrics enabled flag while creating tag rule
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"dynatrace get-marketplace-saas-resource-detail",
)
class GetMarketplaceSaasResourceDetail(AAZCommand):
"""Get Marketplace SaaS resource details of a tenant under a specific subscription
"""Get Marketplace SaaS resource details for a given tenant under a subscription.

:example: Monitors_GetMarketplaceSaaSResourceDetails_MaximumSet_Gen
az dynatrace get-marketplace-saas-resource-detail --tenant-id urnmattojzhktcfw
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"dynatrace monitor",
)
class __CMDGroup(AAZCommandGroup):
"""Manage dynatrace monitor
"""Manage Dynatrace resource on Azure. This command lists properties including Dynatrace environment properties, SSO properties, and plan information.
"""
pass

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@
"dynatrace monitor create",
)
class Create(AAZCommand):
"""Create a monitor resource
"""Create a Dynatrace resource on Azure for monitoring and observability needs.

:example: Create a monitor
az dynatrace monitor create -g rg -n monitor --user-info "{first-name:Alice,last-name:Bobab,email-address:[email protected],phone-number:1234567890,country:US}" --plan-data "{usage-type:committed,billing-cycle:Monthly,plan-details:azureportalintegration_privatepreview@TIDhjdtn7tfnxcy,effective-date:2022-08-20}" --environment "{single-sign-on:{aad-domains:['abc']}}"
"""

_aaz_info = {
"version": "2021-09-01",
"version": "2023-04-27",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/dynatrace.observability/monitors/{}", "2021-09-01"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/dynatrace.observability/monitors/{}", "2023-04-27"],
]
}

Expand Down Expand Up @@ -78,11 +78,13 @@ def _build_arguments_schema(cls, *args, **kwargs):
options=["--plan-data"],
arg_group="Properties",
help="Billing plan information.",
required=True,
)
_args_schema.user_info = AAZObjectArg(
options=["--user-info"],
arg_group="Properties",
help="User info.",
required=True,
)

environment = cls._args_schema.environment
Expand Down Expand Up @@ -157,18 +159,22 @@ def _build_arguments_schema(cls, *args, **kwargs):
plan_data.billing_cycle = AAZStrArg(
options=["billing-cycle"],
help="different billing cycles like MONTHLY/WEEKLY. this could be enum",
required=True,
)
plan_data.effective_date = AAZDateTimeArg(
options=["effective-date"],
help="date when plan was applied",
required=True,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it required?

)
plan_data.plan_details = AAZStrArg(
options=["plan-details"],
help="plan id as published by Dynatrace",
required=True,
)
plan_data.usage_type = AAZStrArg(
options=["usage-type"],
help="different usage type like PAYG/COMMITTED. this could be enum",
required=True,
)

user_info = cls._args_schema.user_info
Expand All @@ -179,17 +185,20 @@ def _build_arguments_schema(cls, *args, **kwargs):
user_info.email_address = AAZStrArg(
options=["email-address"],
help="Email of the user used by Dynatrace for contacting them if needed",
required=True,
fmt=AAZStrArgFormat(
pattern="^[A-Za-z0-9._%+-]+@(?:[A-Za-z0-9-]+\\.)+[A-Za-z]{2,}$",
),
)
user_info.first_name = AAZStrArg(
options=["first-name"],
help="First Name of the user",
required=True,
)
user_info.last_name = AAZStrArg(
options=["last-name"],
help="Last Name of the user",
required=True,
)
user_info.phone_number = AAZStrArg(
options=["phone-number"],
Expand Down Expand Up @@ -333,7 +342,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2021-09-01",
"api-version", "2023-04-27",
required=True,
),
}
Expand All @@ -358,7 +367,7 @@ def content(self):
typ=AAZObjectType,
typ_kwargs={"flags": {"required": True, "client_flatten": True}}
)
_builder.set_prop("identity", AAZObjectType, ".identity")
_builder.set_prop("identity", AAZIdentityObjectType, ".identity")
_builder.set_prop("location", AAZStrType, ".location", typ_kwargs={"flags": {"required": True}})
_builder.set_prop("properties", AAZObjectType, ".", typ_kwargs={"flags": {"required": True, "client_flatten": True}})
_builder.set_prop("tags", AAZDictType, ".tags")
Expand All @@ -382,8 +391,8 @@ def content(self):
properties.set_prop("dynatraceEnvironmentProperties", AAZObjectType, ".environment")
properties.set_prop("marketplaceSubscriptionStatus", AAZStrType, ".subscription_status")
properties.set_prop("monitoringStatus", AAZStrType, ".monitoring_status")
properties.set_prop("planData", AAZObjectType, ".plan_data")
properties.set_prop("userInfo", AAZObjectType, ".user_info")
properties.set_prop("planData", AAZObjectType, ".plan_data", typ_kwargs={"flags": {"required": True}})
properties.set_prop("userInfo", AAZObjectType, ".user_info", typ_kwargs={"flags": {"required": True}})

dynatrace_environment_properties = _builder.get(".properties.dynatraceEnvironmentProperties")
if dynatrace_environment_properties is not None:
Expand Down Expand Up @@ -417,17 +426,17 @@ def content(self):

plan_data = _builder.get(".properties.planData")
if plan_data is not None:
plan_data.set_prop("billingCycle", AAZStrType, ".billing_cycle")
plan_data.set_prop("effectiveDate", AAZStrType, ".effective_date")
plan_data.set_prop("planDetails", AAZStrType, ".plan_details")
plan_data.set_prop("usageType", AAZStrType, ".usage_type")
plan_data.set_prop("billingCycle", AAZStrType, ".billing_cycle", typ_kwargs={"flags": {"required": True}})
plan_data.set_prop("effectiveDate", AAZStrType, ".effective_date", typ_kwargs={"flags": {"required": True}})
plan_data.set_prop("planDetails", AAZStrType, ".plan_details", typ_kwargs={"flags": {"required": True}})
plan_data.set_prop("usageType", AAZStrType, ".usage_type", typ_kwargs={"flags": {"required": True}})

user_info = _builder.get(".properties.userInfo")
if user_info is not None:
user_info.set_prop("country", AAZStrType, ".country")
user_info.set_prop("emailAddress", AAZStrType, ".email_address")
user_info.set_prop("firstName", AAZStrType, ".first_name")
user_info.set_prop("lastName", AAZStrType, ".last_name")
user_info.set_prop("emailAddress", AAZStrType, ".email_address", typ_kwargs={"flags": {"required": True}})
user_info.set_prop("firstName", AAZStrType, ".first_name", typ_kwargs={"flags": {"required": True}})
user_info.set_prop("lastName", AAZStrType, ".last_name", typ_kwargs={"flags": {"required": True}})
user_info.set_prop("phoneNumber", AAZStrType, ".phone_number")

tags = _builder.get(".tags")
Expand Down Expand Up @@ -457,7 +466,7 @@ def _build_schema_on_200_201(cls):
_schema_on_200_201.id = AAZStrType(
flags={"read_only": True},
)
_schema_on_200_201.identity = AAZObjectType()
_schema_on_200_201.identity = AAZIdentityObjectType()
_schema_on_200_201.location = AAZStrType(
flags={"required": True},
)
Expand Down Expand Up @@ -511,6 +520,7 @@ def _build_schema_on_200_201(cls):
)
properties.liftr_resource_category = AAZStrType(
serialized_name="liftrResourceCategory",
flags={"read_only": True},
)
properties.liftr_resource_preference = AAZIntType(
serialized_name="liftrResourcePreference",
Expand All @@ -524,12 +534,15 @@ def _build_schema_on_200_201(cls):
)
properties.plan_data = AAZObjectType(
serialized_name="planData",
flags={"required": True},
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.user_info = AAZObjectType(
serialized_name="userInfo",
flags={"required": True},
)

dynatrace_environment_properties = cls._schema_on_200_201.properties.dynatrace_environment_properties
Expand Down Expand Up @@ -577,6 +590,7 @@ def _build_schema_on_200_201(cls):
)
single_sign_on_properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
single_sign_on_properties.single_sign_on_state = AAZStrType(
serialized_name="singleSignOnState",
Expand All @@ -591,27 +605,34 @@ def _build_schema_on_200_201(cls):
plan_data = cls._schema_on_200_201.properties.plan_data
plan_data.billing_cycle = AAZStrType(
serialized_name="billingCycle",
flags={"required": True},
)
plan_data.effective_date = AAZStrType(
serialized_name="effectiveDate",
flags={"required": True},
)
plan_data.plan_details = AAZStrType(
serialized_name="planDetails",
flags={"required": True},
)
plan_data.usage_type = AAZStrType(
serialized_name="usageType",
flags={"required": True},
)

user_info = cls._schema_on_200_201.properties.user_info
user_info.country = AAZStrType()
user_info.email_address = AAZStrType(
serialized_name="emailAddress",
flags={"required": True},
)
user_info.first_name = AAZStrType(
serialized_name="firstName",
flags={"required": True},
)
user_info.last_name = AAZStrType(
serialized_name="lastName",
flags={"required": True},
)
user_info.phone_number = AAZStrType(
serialized_name="phoneNumber",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
confirmation="Are you sure you want to perform this operation?",
)
class Delete(AAZCommand):
"""Delete a monitor resource
"""Delete a Dynatrace resource.

:example: Delete a monitor
az dynatrace monitor delete -n monitor -g rg -y
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"dynatrace monitor get-metric-status",
)
class GetMetricStatus(AAZCommand):
"""Get metric status
"""Get status of metrics being sent to the Dynatrace resource.

:example: Monitors_GetMetricStatus_MaximumSet_Gen
az dynatrace monitor get-metric-status --resource-group rgDynatrace --monitor-name fhcjxnxumkdlgpwanewtkdnyuz
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"dynatrace monitor get-sso-detail",
)
class GetSsoDetail(AAZCommand):
"""Get the SSO configuration details from the partner
"""Get the SSO configuration details for Dynatrace resource.

:example: Get-sso-detail
az dynatrace monitor get-sso-detail -g rg --monitor-name monitor --user-principal [email protected]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"dynatrace monitor get-vm-host-payload",
)
class GetVmHostPayload(AAZCommand):
"""Return the payload that need to be passed in the request body for installing Dynatrace agent on a VM
"""Return payload to be included in API request body when installing Dynatrace agent on a Virtual Machine. Use this command to facilitate automated deployment of monitoring agents across VMs.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we pass a payload in the API, is this backend API? Is it used for automated deployments of agents?


:example: Get-vm-host-payload
az dynatrace monitor get-vm-host-payload -g rg --monitor-name monitor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"dynatrace monitor list",
)
class List(AAZCommand):
"""List all monitor resource by monitor name in a resource group
"""List all MonitorResource by subscriptionId.

:example: List monitor
az dynatrace monitor list -g rg --monitor-name monitor
Expand Down Expand Up @@ -159,7 +159,7 @@ def _build_schema_on_200(cls):
_element.id = AAZStrType(
flags={"read_only": True},
)
_element.identity = AAZObjectType()
_element.identity = AAZIdentityObjectType()
_element.location = AAZStrType(
flags={"required": True},
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"dynatrace monitor list-app-service",
)
class ListAppService(AAZCommand):
"""Get list of app services with dynatrace PaaS OneAgent enabled
"""List all App Services that have Dynatrace OneAgent installed.

:example: List-app-service
az dynatrace monitor list-app-service -g rg --monitor-name monitor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"dynatrace monitor list-host",
)
class ListHost(AAZCommand):
"""List the compute resources currently being monitored by the dynatrace resource
"""Displays compute resources (VMs, VMSS) that are currently being monitored by the specified Dynatrace resource.

:example: List-host
az dynatrace monitor list-host -g rg --monitor-name monitor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"dynatrace monitor list-linkable-environment",
)
class ListLinkableEnvironment(AAZCommand):
"""Get all the dynatrace environments that a user can link a azure resource to
"""List all available Dynatrace environments that can be integrated with your Azure Dynatrace resources.

:example: List-linkable-environment
az dynatrace monitor list-linkable-environment -g rg --monitor-name monitor --user-principal [email protected] --region eastus2euap
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"dynatrace monitor list-monitored-resource",
)
class ListMonitoredResource(AAZCommand):
"""List the resources currently being monitored by the dynatrace monitor resource
"""List of all Azure resources currently being monitored by a Dynatrace resource.

:example: List-monitored-resource
az dynatrace monitor list-monitored-resource -g rg --monitor-name monitor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"dynatrace monitor show",
)
class Show(AAZCommand):
"""Show a monitor resource
"""Get Dynatrace resource properties including Dynatrace Environment information, SSO properties, resource location, marketplace subscription status and associated user information.

:example: Show a monitor
az dynatrace monitor show -g rg -n monitor
Expand Down Expand Up @@ -156,7 +156,7 @@ def _build_schema_on_200(cls):
_schema_on_200.id = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.identity = AAZObjectType()
_schema_on_200.identity = AAZIdentityObjectType()
_schema_on_200.location = AAZStrType(
flags={"required": True},
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"dynatrace monitor update",
)
class Update(AAZCommand):
"""Update a MonitorResource
"""Update a Dynatrace resource on Azure for monitoring and observability needs.

:example: Update monitor
az dynatrace monitor update -g {rg} -n {monitor} --tags {{env:dev}}
Expand Down Expand Up @@ -186,7 +186,7 @@ def _build_schema_on_200(cls):
_schema_on_200.id = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.identity = AAZObjectType()
_schema_on_200.identity = AAZIdentityObjectType()
_schema_on_200.location = AAZStrType(
flags={"required": True},
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def _build_schema_on_200(cls):
_schema_on_200.id = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.identity = AAZObjectType()
_schema_on_200.identity = AAZIdentityObjectType()
_schema_on_200.location = AAZStrType(
flags={"required": True},
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"dynatrace monitor sso-config",
)
class __CMDGroup(AAZCommandGroup):
"""Manage monitor sso-config
"""Manage Single Sign-On (SSO) configuration between Azure and Dynatrace. This enables unified authentication for users accessing Dynatrace through Azure.
"""
pass

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"dynatrace monitor sso-config create",
)
class Create(AAZCommand):
"""Create a dynatrace sso-config resource
"""Create a new SSO configuration for seamless authentication between Azure and the Dynatrace platform.

:example: Create a sso-config
az dynatrace monitor sso-config create -g rg --monitor-name monitor -n default --aad-domains "['mpliftrdt20210811outlook.onmicrosoft.com']" --single-sign-on-url "https://www.dynatrace.io"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"dynatrace monitor sso-config list",
)
class List(AAZCommand):
"""List all dynatrace sso-config by monitor name
"""List all SSO configurations associated with a specific Dynatrace resource.

:example: List sso-config
az dynatrace monitor sso-config list -g rg --monitor-name monitor
Expand Down
Loading
Loading