in src/providerhub/azext_providerhub/aaz/latest/providerhub/provider_registration/_update.py [0:0]
def _update_instance(self, instance):
_instance_value, _builder = self.new_content_builder(
self.ctx.args,
value=instance,
typ=AAZObjectType
)
_builder.set_prop("kind", AAZStrType, ".kind")
_builder.set_prop("properties", AAZObjectType)
properties = _builder.get(".properties")
if properties is not None:
properties.set_prop("capabilities", AAZListType, ".capabilities")
properties.set_prop("crossTenantTokenValidation", AAZStrType, ".cross_tenant_token_validation")
properties.set_prop("customManifestVersion", AAZStrType, ".custom_manifest_version")
properties.set_prop("dstsConfiguration", AAZObjectType, ".dsts_configuration")
properties.set_prop("enableTenantLinkedNotification", AAZBoolType, ".enable_tenant_linked_notification", typ_kwargs={"nullable": True})
properties.set_prop("featuresRule", AAZObjectType)
properties.set_prop("globalNotificationEndpoints", AAZListType, ".global_notification_endpoints")
properties.set_prop("legacyNamespace", AAZStrType, ".legacy_namespace")
properties.set_prop("legacyRegistrations", AAZListType, ".legacy_registrations")
properties.set_prop("linkedNotificationRules", AAZListType, ".linked_notification_rules")
properties.set_prop("management", AAZObjectType)
properties.set_prop("managementGroupGlobalNotificationEndpoints", AAZListType, ".management_group_global_notification_endpoints")
properties.set_prop("metadata", AAZFreeFormDictType, ".metadata")
properties.set_prop("namespace", AAZStrType, ".namespace")
properties.set_prop("notificationOptions", AAZStrType, ".notification_options")
properties.set_prop("notificationSettings", AAZObjectType, ".notification_settings")
properties.set_prop("notifications", AAZListType, ".notifications")
properties.set_prop("optionalFeatures", AAZListType, ".optional_features")
properties.set_prop("privateResourceProviderConfiguration", AAZObjectType, ".private_resource_provider_configuration")
properties.set_prop("providerAuthentication", AAZObjectType, ".provider_authentication")
properties.set_prop("providerAuthorizations", AAZListType, ".provider_authorizations")
properties.set_prop("providerHubMetadata", AAZObjectType, ".provider_hub_metadata")
properties.set_prop("providerType", AAZStrType, ".provider_type")
properties.set_prop("providerVersion", AAZStrType, ".provider_version")
properties.set_prop("requestHeaderOptions", AAZObjectType)
properties.set_prop("requiredFeatures", AAZListType, ".required_features")
properties.set_prop("resourceGroupLockOptionDuringMove", AAZObjectType, ".resource_group_lock_option_during_move")
properties.set_prop("resourceHydrationAccounts", AAZListType, ".resource_hydration_accounts")
properties.set_prop("resourceProviderAuthorizationRules", AAZObjectType, ".resource_provider_authorization_rules")
properties.set_prop("responseOptions", AAZObjectType, ".response_options")
properties.set_prop("serviceName", AAZStrType, ".service_name")
properties.set_prop("services", AAZListType, ".services")
properties.set_prop("subscriptionLifecycleNotificationSpecifications", AAZObjectType)
properties.set_prop("templateDeploymentOptions", AAZObjectType, ".template_deployment_options")
_UpdateHelper._build_schema_token_auth_configuration_update(properties.set_prop("tokenAuthConfiguration", AAZObjectType, ".token_auth_configuration"))
capabilities = _builder.get(".properties.capabilities")
if capabilities is not None:
capabilities.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.capabilities[]")
if _elements is not None:
_elements.set_prop("effect", AAZStrType, ".effect", typ_kwargs={"flags": {"required": True}})
_elements.set_prop("quotaId", AAZStrType, ".quota_id", typ_kwargs={"flags": {"required": True}})
_elements.set_prop("requiredFeatures", AAZListType, ".required_features")
required_features = _builder.get(".properties.capabilities[].requiredFeatures")
if required_features is not None:
required_features.set_elements(AAZStrType, ".")
dsts_configuration = _builder.get(".properties.dstsConfiguration")
if dsts_configuration is not None:
dsts_configuration.set_prop("serviceDnsName", AAZStrType, ".service_dns_name")
dsts_configuration.set_prop("serviceName", AAZStrType, ".service_name", typ_kwargs={"flags": {"required": True}})
features_rule = _builder.get(".properties.featuresRule")
if features_rule is not None:
features_rule.set_prop("requiredFeaturesPolicy", AAZStrType, ".required_features_policy", typ_kwargs={"flags": {"required": True}})
global_notification_endpoints = _builder.get(".properties.globalNotificationEndpoints")
if global_notification_endpoints is not None:
_UpdateHelper._build_schema_resource_provider_endpoint_update(global_notification_endpoints.set_elements(AAZObjectType, "."))
legacy_registrations = _builder.get(".properties.legacyRegistrations")
if legacy_registrations is not None:
legacy_registrations.set_elements(AAZStrType, ".")
linked_notification_rules = _builder.get(".properties.linkedNotificationRules")
if linked_notification_rules is not None:
linked_notification_rules.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.linkedNotificationRules[]")
if _elements is not None:
_elements.set_prop("actions", AAZListType, ".actions")
_elements.set_prop("dstsConfiguration", AAZObjectType, ".dsts_configuration")
_elements.set_prop("endpoints", AAZListType, ".endpoints")
_UpdateHelper._build_schema_token_auth_configuration_update(_elements.set_prop("tokenAuthConfiguration", AAZObjectType, ".token_auth_configuration"))
actions = _builder.get(".properties.linkedNotificationRules[].actions")
if actions is not None:
actions.set_elements(AAZStrType, ".")
dsts_configuration = _builder.get(".properties.linkedNotificationRules[].dstsConfiguration")
if dsts_configuration is not None:
dsts_configuration.set_prop("serviceDnsName", AAZStrType, ".service_dns_name")
dsts_configuration.set_prop("serviceName", AAZStrType, ".service_name", typ_kwargs={"flags": {"required": True}})
endpoints = _builder.get(".properties.linkedNotificationRules[].endpoints")
if endpoints is not None:
_UpdateHelper._build_schema_resource_provider_endpoint_update(endpoints.set_elements(AAZObjectType, "."))
management = _builder.get(".properties.management")
if management is not None:
management.set_prop("authorizationOwners", AAZListType, ".authorization_owners")
management.set_prop("canaryManifestOwners", AAZListType, ".canary_manifest_owners")
management.set_prop("errorResponseMessageOptions", AAZObjectType, ".error_response_message_options")
management.set_prop("expeditedRolloutMetadata", AAZObjectType, ".expedited_rollout_metadata")
management.set_prop("expeditedRolloutSubmitters", AAZListType, ".expedited_rollout_submitters")
management.set_prop("incidentContactEmail", AAZStrType, ".incident_contact_email")
management.set_prop("incidentRoutingService", AAZStrType, ".incident_routing_service")
management.set_prop("incidentRoutingTeam", AAZStrType, ".incident_routing_team")
management.set_prop("manifestOwners", AAZListType, ".manifest_owners")
management.set_prop("pcCode", AAZStrType, ".pc_code")
management.set_prop("profitCenterProgramId", AAZStrType, ".profit_center_program_id")
management.set_prop("resourceAccessPolicy", AAZStrType, ".resource_access_policy")
management.set_prop("resourceAccessRoles", AAZListType, ".resource_access_roles")
management.set_prop("schemaOwners", AAZListType, ".schema_owners")
management.set_prop("serviceTreeInfos", AAZListType, ".service_tree_infos")
authorization_owners = _builder.get(".properties.management.authorizationOwners")
if authorization_owners is not None:
authorization_owners.set_elements(AAZStrType, ".")
canary_manifest_owners = _builder.get(".properties.management.canaryManifestOwners")
if canary_manifest_owners is not None:
canary_manifest_owners.set_elements(AAZStrType, ".")
error_response_message_options = _builder.get(".properties.management.errorResponseMessageOptions")
if error_response_message_options is not None:
error_response_message_options.set_prop("serverFailureResponseMessageType", AAZStrType, ".server_failure_response_message_type")
expedited_rollout_metadata = _builder.get(".properties.management.expeditedRolloutMetadata")
if expedited_rollout_metadata is not None:
expedited_rollout_metadata.set_prop("enabled", AAZBoolType, ".enabled")
expedited_rollout_metadata.set_prop("expeditedRolloutIntent", AAZStrType, ".expedited_rollout_intent")
expedited_rollout_submitters = _builder.get(".properties.management.expeditedRolloutSubmitters")
if expedited_rollout_submitters is not None:
expedited_rollout_submitters.set_elements(AAZStrType, ".")
manifest_owners = _builder.get(".properties.management.manifestOwners")
if manifest_owners is not None:
manifest_owners.set_elements(AAZStrType, ".")
resource_access_roles = _builder.get(".properties.management.resourceAccessRoles")
if resource_access_roles is not None:
resource_access_roles.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.management.resourceAccessRoles[]")
if _elements is not None:
_elements.set_prop("actions", AAZListType, ".actions")
_elements.set_prop("allowedGroupClaims", AAZListType, ".allowed_group_claims")
actions = _builder.get(".properties.management.resourceAccessRoles[].actions")
if actions is not None:
actions.set_elements(AAZStrType, ".")
allowed_group_claims = _builder.get(".properties.management.resourceAccessRoles[].allowedGroupClaims")
if allowed_group_claims is not None:
allowed_group_claims.set_elements(AAZStrType, ".")
schema_owners = _builder.get(".properties.management.schemaOwners")
if schema_owners is not None:
schema_owners.set_elements(AAZStrType, ".")
service_tree_infos = _builder.get(".properties.management.serviceTreeInfos")
if service_tree_infos is not None:
service_tree_infos.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.management.serviceTreeInfos[]")
if _elements is not None:
_elements.set_prop("componentId", AAZStrType, ".component_id")
_elements.set_prop("readiness", AAZStrType, ".readiness")
_elements.set_prop("serviceId", AAZStrType, ".service_id")
management_group_global_notification_endpoints = _builder.get(".properties.managementGroupGlobalNotificationEndpoints")
if management_group_global_notification_endpoints is not None:
_UpdateHelper._build_schema_resource_provider_endpoint_update(management_group_global_notification_endpoints.set_elements(AAZObjectType, "."))
metadata = _builder.get(".properties.metadata")
if metadata is not None:
metadata.set_anytype_elements(".")
notification_settings = _builder.get(".properties.notificationSettings")
if notification_settings is not None:
notification_settings.set_prop("subscriberSettings", AAZListType, ".subscriber_settings")
subscriber_settings = _builder.get(".properties.notificationSettings.subscriberSettings")
if subscriber_settings is not None:
subscriber_settings.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.notificationSettings.subscriberSettings[]")
if _elements is not None:
_elements.set_prop("filterRules", AAZListType, ".filter_rules")
filter_rules = _builder.get(".properties.notificationSettings.subscriberSettings[].filterRules")
if filter_rules is not None:
filter_rules.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.notificationSettings.subscriberSettings[].filterRules[]")
if _elements is not None:
_elements.set_prop("endpointInformation", AAZListType, ".endpoint_information")
_elements.set_prop("filterQuery", AAZStrType, ".filter_query")
endpoint_information = _builder.get(".properties.notificationSettings.subscriberSettings[].filterRules[].endpointInformation")
if endpoint_information is not None:
endpoint_information.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.notificationSettings.subscriberSettings[].filterRules[].endpointInformation[]")
if _elements is not None:
_elements.set_prop("endpoint", AAZStrType, ".endpoint")
_elements.set_prop("endpointType", AAZStrType, ".endpoint_type")
_elements.set_prop("schemaVersion", AAZStrType, ".schema_version")
notifications = _builder.get(".properties.notifications")
if notifications is not None:
notifications.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.notifications[]")
if _elements is not None:
_elements.set_prop("notificationType", AAZStrType, ".notification_type")
_elements.set_prop("skipNotifications", AAZStrType, ".skip_notifications")
optional_features = _builder.get(".properties.optionalFeatures")
if optional_features is not None:
optional_features.set_elements(AAZStrType, ".")
private_resource_provider_configuration = _builder.get(".properties.privateResourceProviderConfiguration")
if private_resource_provider_configuration is not None:
private_resource_provider_configuration.set_prop("allowedSubscriptions", AAZListType, ".allowed_subscriptions")
allowed_subscriptions = _builder.get(".properties.privateResourceProviderConfiguration.allowedSubscriptions")
if allowed_subscriptions is not None:
allowed_subscriptions.set_elements(AAZStrType, ".")
provider_authentication = _builder.get(".properties.providerAuthentication")
if provider_authentication is not None:
provider_authentication.set_prop("allowedAudiences", AAZListType, ".allowed_audiences", typ_kwargs={"flags": {"required": True}})
allowed_audiences = _builder.get(".properties.providerAuthentication.allowedAudiences")
if allowed_audiences is not None:
allowed_audiences.set_elements(AAZStrType, ".")
provider_authorizations = _builder.get(".properties.providerAuthorizations")
if provider_authorizations is not None:
_UpdateHelper._build_schema_resource_provider_authorization_update(provider_authorizations.set_elements(AAZObjectType, "."))
provider_hub_metadata = _builder.get(".properties.providerHubMetadata")
if provider_hub_metadata is not None:
provider_hub_metadata.set_prop("directRpRoleDefinitionId", AAZStrType, ".direct_rp_role_definition_id")
provider_hub_metadata.set_prop("globalAsyncOperationResourceTypeName", AAZStrType, ".global_async_operation_resource_type_name")
provider_hub_metadata.set_prop("providerAuthentication", AAZObjectType, ".provider_authentication")
provider_hub_metadata.set_prop("providerAuthorizations", AAZListType, ".provider_authorizations")
provider_hub_metadata.set_prop("regionalAsyncOperationResourceTypeName", AAZStrType, ".regional_async_operation_resource_type_name")
provider_hub_metadata.set_prop("thirdPartyProviderAuthorization", AAZObjectType, ".third_party_provider_authorization")
provider_authentication = _builder.get(".properties.providerHubMetadata.providerAuthentication")
if provider_authentication is not None:
provider_authentication.set_prop("allowedAudiences", AAZListType, ".allowed_audiences", typ_kwargs={"flags": {"required": True}})
allowed_audiences = _builder.get(".properties.providerHubMetadata.providerAuthentication.allowedAudiences")
if allowed_audiences is not None:
allowed_audiences.set_elements(AAZStrType, ".")
provider_authorizations = _builder.get(".properties.providerHubMetadata.providerAuthorizations")
if provider_authorizations is not None:
_UpdateHelper._build_schema_resource_provider_authorization_update(provider_authorizations.set_elements(AAZObjectType, "."))
third_party_provider_authorization = _builder.get(".properties.providerHubMetadata.thirdPartyProviderAuthorization")
if third_party_provider_authorization is not None:
third_party_provider_authorization.set_prop("authorizations", AAZListType, ".authorizations")
third_party_provider_authorization.set_prop("managedByTenantId", AAZStrType, ".managed_by_tenant_id")
authorizations = _builder.get(".properties.providerHubMetadata.thirdPartyProviderAuthorization.authorizations")
if authorizations is not None:
authorizations.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.providerHubMetadata.thirdPartyProviderAuthorization.authorizations[]")
if _elements is not None:
_elements.set_prop("principalId", AAZStrType, ".principal_id", typ_kwargs={"flags": {"required": True}})
_elements.set_prop("roleDefinitionId", AAZStrType, ".role_definition_id", typ_kwargs={"flags": {"required": True}})
request_header_options = _builder.get(".properties.requestHeaderOptions")
if request_header_options is not None:
request_header_options.set_prop("optInHeaders", AAZStrType, ".opt_in_headers")
request_header_options.set_prop("optOutHeaders", AAZStrType, ".opt_out_headers")
required_features = _builder.get(".properties.requiredFeatures")
if required_features is not None:
required_features.set_elements(AAZStrType, ".")
resource_group_lock_option_during_move = _builder.get(".properties.resourceGroupLockOptionDuringMove")
if resource_group_lock_option_during_move is not None:
resource_group_lock_option_during_move.set_prop("blockActionVerb", AAZStrType, ".block_action_verb")
resource_hydration_accounts = _builder.get(".properties.resourceHydrationAccounts")
if resource_hydration_accounts is not None:
resource_hydration_accounts.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.resourceHydrationAccounts[]")
if _elements is not None:
_elements.set_prop("accountName", AAZStrType, ".account_name")
_elements.set_prop("encryptedKey", AAZStrType, ".encrypted_key")
_elements.set_prop("maxChildResourceConsistencyJobLimit", AAZIntType, ".max_child_resource_consistency_job_limit")
_elements.set_prop("subscriptionId", AAZStrType, ".subscription_id")
resource_provider_authorization_rules = _builder.get(".properties.resourceProviderAuthorizationRules")
if resource_provider_authorization_rules is not None:
resource_provider_authorization_rules.set_prop("asyncOperationPollingRules", AAZObjectType, ".async_operation_polling_rules")
async_operation_polling_rules = _builder.get(".properties.resourceProviderAuthorizationRules.asyncOperationPollingRules")
if async_operation_polling_rules is not None:
async_operation_polling_rules.set_prop("additionalOptions", AAZStrType, ".additional_options")
async_operation_polling_rules.set_prop("authorizationActions", AAZListType, ".authorization_actions")
authorization_actions = _builder.get(".properties.resourceProviderAuthorizationRules.asyncOperationPollingRules.authorizationActions")
if authorization_actions is not None:
authorization_actions.set_elements(AAZStrType, ".")
response_options = _builder.get(".properties.responseOptions")
if response_options is not None:
response_options.set_prop("serviceClientOptionsType", AAZStrType, ".service_client_options_type")
services = _builder.get(".properties.services")
if services is not None:
services.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.services[]")
if _elements is not None:
_elements.set_prop("serviceName", AAZStrType, ".service_name")
_elements.set_prop("status", AAZStrType, ".status")
subscription_lifecycle_notification_specifications = _builder.get(".properties.subscriptionLifecycleNotificationSpecifications")
if subscription_lifecycle_notification_specifications is not None:
subscription_lifecycle_notification_specifications.set_prop("softDeleteTTL", AAZStrType, ".soft_delete_ttl")
subscription_lifecycle_notification_specifications.set_prop("subscriptionStateOverrideActions", AAZListType, ".subscription_state_override_actions")
subscription_state_override_actions = _builder.get(".properties.subscriptionLifecycleNotificationSpecifications.subscriptionStateOverrideActions")
if subscription_state_override_actions is not None:
subscription_state_override_actions.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.subscriptionLifecycleNotificationSpecifications.subscriptionStateOverrideActions[]")
if _elements is not None:
_elements.set_prop("action", AAZStrType, ".action", typ_kwargs={"flags": {"required": True}})
_elements.set_prop("state", AAZStrType, ".state", typ_kwargs={"flags": {"required": True}})
template_deployment_options = _builder.get(".properties.templateDeploymentOptions")
if template_deployment_options is not None:
template_deployment_options.set_prop("preflightOptions", AAZListType, ".preflight_options")
template_deployment_options.set_prop("preflightSupported", AAZBoolType, ".preflight_supported")
preflight_options = _builder.get(".properties.templateDeploymentOptions.preflightOptions")
if preflight_options is not None:
preflight_options.set_elements(AAZStrType, ".")
return _instance_value