1616 DEFAULT_NS_POLICY_NAME ,
1717 DEFAULT_NS_POLICY_CERT_KEY_TYPE ,
1818 DEFAULT_NS_POLICY_CERT_VALIDITY_DAYS ,
19- CertificateManagementState ,
2019 IdentityType ,
2120 build_mi_body ,
2221)
@@ -76,7 +75,6 @@ def create(
7675 resource_group_name : str ,
7776 location : Optional [str ] = None ,
7877 tags : Optional [Dict [str , str ]] = None ,
79- enable_certificate_management : Optional [bool ] = None ,
8078 policy_name : Optional [str ] = None ,
8179 certificate_key_type : Optional [str ] = None ,
8280 certificate_subject : Optional [str ] = None ,
@@ -86,9 +84,7 @@ def create(
8684 ** kwargs ,
8785 ):
8886 # Legacy credential/policy bootstrap (DEPRECATED): triggered only by explicit legacy policy
89- # args. `--enable-certificate-management` no longer drives this; it now solely sets the
90- # namespace-level `certificateManagement` state (the real API field). Certificate authorities
91- # and policies are managed via `iot adr ns ca`.
87+ # args. Certificate authorities and policies are managed via `iot adr ns ca`.
9288 should_create_credential_policy = any ([
9389 policy_name ,
9490 certificate_key_type ,
@@ -97,13 +93,6 @@ def create(
9793 ])
9894
9995 if should_create_credential_policy :
100- # Contradictory inputs: cannot bootstrap a credential policy while disabling cert management
101- if enable_certificate_management is False :
102- raise MutuallyExclusiveArgumentError (
103- "Cannot create a custom credential policy while "
104- "`--enable-certificate-management` is false."
105- )
106-
10796 logger .warning (
10897 "Creating a default credential and credential policy is deprecated and will be "
10998 "removed in a future release. Use 'az iot adr ns ca' to manage certificate "
@@ -132,12 +121,6 @@ def create(
132121 )
133122
134123 properties = {}
135- if enable_certificate_management is not None :
136- properties ["certificateManagement" ] = (
137- CertificateManagementState .enabled .value
138- if enable_certificate_management
139- else CertificateManagementState .disabled .value
140- )
141124 if outbound_identity is not None :
142125 properties ["outboundIdentity" ] = outbound_identity
143126 if properties :
@@ -225,7 +208,6 @@ def update(
225208 namespace_name : str ,
226209 resource_group_name : str ,
227210 tags : Optional [Dict [str , str ]] = None ,
228- enable_certificate_management : Optional [bool ] = None ,
229211 outbound_mi_system_assigned : Optional [bool ] = None ,
230212 outbound_mi_user_assigned : Optional [str ] = None ,
231213 ** kwargs ,
@@ -236,12 +218,6 @@ def update(
236218 body ["tags" ] = tags
237219
238220 properties : dict = {}
239- if enable_certificate_management is not None :
240- properties ["certificateManagement" ] = (
241- CertificateManagementState .enabled .value
242- if enable_certificate_management
243- else CertificateManagementState .disabled .value
244- )
245221
246222 outbound_identity = _resolve_outbound_identity (
247223 outbound_mi_system_assigned , outbound_mi_user_assigned
0 commit comments