@@ -18,16 +18,16 @@ class Create(AAZCommand):
1818 """Creates a new Datadog monitor resource in your Azure subscription. This sets up the integration between Azure and your Datadog account, enabling observability and monitoring of your Azure resources through Datadog.
1919
2020 :example: Monitors_Create
21- 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 "
21+ az datadog monitor create --name "myMonitor" --resource-group "myResourceGroup" --location "West US 2" --org-properties name="myResourceGroup" -- tags Environment="Dev" --user-info name="Alice" email-address="alice@microsoft.com" phone-number="123-456-7890" --sku name="payg_v3_Monthly" --identity type=" SystemAssigned" --monitoring-status "Enabled "
2222
2323 :example: Monitors creation with linking to Datadog organization.
24- 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"
24+ az datadog monitor create --name "myMonitor-link " --resource-group "myResourceGroup" --location "West US 2" --org- properties api-key=XX application-key=XX --tags Environment="Dev" --user-info name="Alice" email-address="alice@microsoft.com" phone-number="123-456-7890" --identity type= "SystemAssigned" --sku name= "Linked"
2525 """
2626
2727 _aaz_info = {
28- "version" : "2021-03-01 " ,
28+ "version" : "2023-10-20 " ,
2929 "resources" : [
30- ["mgmt-plane" , "/subscriptions/{}/resourcegroups/{}/providers/microsoft.datadog/monitors/{}" , "2021-03-01 " ],
30+ ["mgmt-plane" , "/subscriptions/{}/resourcegroups/{}/providers/microsoft.datadog/monitors/{}" , "2023-10-20 " ],
3131 ]
3232 }
3333
@@ -99,8 +99,8 @@ def _build_arguments_schema(cls, *args, **kwargs):
9999 # define Arg Group "Properties"
100100
101101 _args_schema = cls ._args_schema
102- _args_schema .datadog_organization_properties = AAZObjectArg (
103- options = ["--datadog-organization -properties" ],
102+ _args_schema .org_properties = AAZObjectArg (
103+ options = ["--org -properties" ],
104104 arg_group = "Properties" ,
105105 help = "Datadog organization properties" ,
106106 )
@@ -117,28 +117,40 @@ def _build_arguments_schema(cls, *args, **kwargs):
117117 help = "User info" ,
118118 )
119119
120- datadog_organization_properties = cls ._args_schema .datadog_organization_properties
121- datadog_organization_properties .api_key = AAZStrArg (
120+ org_properties = cls ._args_schema .org_properties
121+ org_properties .api_key = AAZStrArg (
122122 options = ["api-key" ],
123123 help = "Api key associated to the Datadog organization." ,
124124 )
125- datadog_organization_properties .application_key = AAZStrArg (
125+ org_properties .application_key = AAZStrArg (
126126 options = ["application-key" ],
127127 help = "Application key associated to the Datadog organization." ,
128128 )
129- datadog_organization_properties .enterprise_app_id = AAZStrArg (
129+ org_properties .cspm = AAZBoolArg (
130+ options = ["cspm" ],
131+ help = "The configuration which describes the state of cloud security posture management. This collects configuration information for all resources in a subscription and track conformance to industry benchmarks." ,
132+ )
133+ org_properties .enterprise_app_id = AAZStrArg (
130134 options = ["enterprise-app-id" ],
131135 help = "The Id of the Enterprise App used for Single sign on." ,
132136 )
133- datadog_organization_properties .linking_auth_code = AAZStrArg (
137+ org_properties .id = AAZStrArg (
138+ options = ["id" ],
139+ help = "Id of the Datadog organization." ,
140+ )
141+ org_properties .linking_auth_code = AAZStrArg (
134142 options = ["linking-auth-code" ],
135143 help = "The auth code used to linking to an existing datadog organization." ,
136144 )
137- datadog_organization_properties .linking_client_id = AAZStrArg (
145+ org_properties .linking_client_id = AAZStrArg (
138146 options = ["linking-client-id" ],
139147 help = "The client_id from an existing in exchange for an auth token to link organization." ,
140148 )
141- datadog_organization_properties .redirect_uri = AAZStrArg (
149+ org_properties .name = AAZStrArg (
150+ options = ["name" ],
151+ help = "Name of the Datadog organization." ,
152+ )
153+ org_properties .redirect_uri = AAZStrArg (
142154 options = ["redirect-uri" ],
143155 help = "The redirect uri for linking." ,
144156 )
@@ -248,7 +260,7 @@ def url_parameters(self):
248260 def query_parameters (self ):
249261 parameters = {
250262 ** self .serialize_query_param (
251- "api-version" , "2021-03-01 " ,
263+ "api-version" , "2023-10-20 " ,
252264 required = True ,
253265 ),
254266 }
@@ -285,17 +297,20 @@ def content(self):
285297
286298 properties = _builder .get (".properties" )
287299 if properties is not None :
288- properties .set_prop ("datadogOrganizationProperties" , AAZObjectType , ".datadog_organization_properties " )
300+ properties .set_prop ("datadogOrganizationProperties" , AAZObjectType , ".org_properties " )
289301 properties .set_prop ("monitoringStatus" , AAZStrType , ".monitoring_status" )
290302 properties .set_prop ("userInfo" , AAZObjectType , ".user_info" , typ_kwargs = {"flags" : {"secret" : True }})
291303
292304 datadog_organization_properties = _builder .get (".properties.datadogOrganizationProperties" )
293305 if datadog_organization_properties is not None :
294306 datadog_organization_properties .set_prop ("apiKey" , AAZStrType , ".api_key" , typ_kwargs = {"flags" : {"secret" : True }})
295307 datadog_organization_properties .set_prop ("applicationKey" , AAZStrType , ".application_key" , typ_kwargs = {"flags" : {"secret" : True }})
308+ datadog_organization_properties .set_prop ("cspm" , AAZBoolType , ".cspm" )
296309 datadog_organization_properties .set_prop ("enterpriseAppId" , AAZStrType , ".enterprise_app_id" )
310+ datadog_organization_properties .set_prop ("id" , AAZStrType , ".id" )
297311 datadog_organization_properties .set_prop ("linkingAuthCode" , AAZStrType , ".linking_auth_code" , typ_kwargs = {"flags" : {"secret" : True }})
298312 datadog_organization_properties .set_prop ("linkingClientId" , AAZStrType , ".linking_client_id" , typ_kwargs = {"flags" : {"secret" : True }})
313+ datadog_organization_properties .set_prop ("name" , AAZStrType , ".name" )
299314 datadog_organization_properties .set_prop ("redirectUri" , AAZStrType , ".redirect_uri" )
300315
301316 user_info = _builder .get (".properties.userInfo" )
@@ -393,12 +408,9 @@ def _build_schema_on_200_201(cls):
393408 )
394409
395410 datadog_organization_properties = cls ._schema_on_200_201 .properties .datadog_organization_properties
396- datadog_organization_properties .id = AAZStrType (
397- flags = {"read_only" : True },
398- )
399- datadog_organization_properties .name = AAZStrType (
400- flags = {"read_only" : True },
401- )
411+ datadog_organization_properties .cspm = AAZBoolType ()
412+ datadog_organization_properties .id = AAZStrType ()
413+ datadog_organization_properties .name = AAZStrType ()
402414
403415 user_info = cls ._schema_on_200_201 .properties .user_info
404416 user_info .email_address = AAZStrType (
0 commit comments